[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
mrobinson at webkit.org
mrobinson at webkit.org
Thu Apr 8 01:48:33 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit fb410b1f0c33cd7c2141c15d12eec3663dec06a6
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 16 06:17:21 2010 +0000
2010-02-15 Martin Robinson <mrobinson at webkit.org>
Reviewed by Darin Adler.
check-webkit-style should not complain about NULL sentinel in calls to g_strconcat and g_strjoin
https://bugs.webkit.org/show_bug.cgi?id=34834
* Scripts/webkitpy/style/processors/cpp.py:
* Scripts/webkitpy/style/processors/cpp_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6ab1d62..43167bc 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-15 Martin Robinson <mrobinson at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ check-webkit-style should not complain about NULL sentinel in calls to g_strconcat and g_strjoin
+ https://bugs.webkit.org/show_bug.cgi?id=34834
+
+ * Scripts/webkitpy/style/processors/cpp.py:
+ * Scripts/webkitpy/style/processors/cpp_unittest.py:
+
2010-02-12 Alexey Proskuryakov <ap at apple.com>
Reviewed by Kevin Decker.
diff --git a/WebKitTools/Scripts/webkitpy/style/processors/cpp.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
index 182c967..b94a91b 100644
--- a/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
+++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
@@ -1868,6 +1868,10 @@ def check_for_null(file_extension, clean_lines, line_number, error):
if search(r'\bg_object_[sg]et\b', line):
return
+ # Don't warn about NULL usage in g_str{join,concat}(). See Bug 34834
+ if search(r'\bg_str(join|concat)\b', line):
+ return
+
if search(r'\bNULL\b', line):
error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
return
diff --git a/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
index fb5a487..2beb3e1 100644
--- a/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
@@ -3392,13 +3392,26 @@ class WebKitStyleTest(CppStyleTestBase):
'',
'foo.m')
- # Make sure that the NULL check does not apply to g_object_{set,get}
+ # Make sure that the NULL check does not apply to g_object_{set,get} and
+ # g_str{join,concat}
self.assert_lint(
'g_object_get(foo, "prop", &bar, NULL);',
'')
self.assert_lint(
'g_object_set(foo, "prop", bar, NULL);',
'')
+ self.assert_lint(
+ 'gchar* result = g_strconcat("part1", "part2", "part3", NULL);',
+ '')
+ self.assert_lint(
+ 'gchar* result = g_strconcat("part1", NULL);',
+ '')
+ self.assert_lint(
+ 'gchar* result = g_strjoin(",", "part1", "part2", "part3", NULL);',
+ '')
+ self.assert_lint(
+ 'gchar* result = g_strjoin(",", "part1", NULL);',
+ '')
# 2. C++ and C bool values should be written as true and
# false. Objective-C BOOL values should be written as YES and NO.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list