[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:46:25 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 5bc7d5140d72085aa351925d6b9528b6bc24d973
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 22 21:18:50 2009 +0000

    2009-12-22  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Adam Barth.
    
            check-webkit-style should not warn about NULL usage in g_object_{get,set}
            https://bugs.webkit.org/show_bug.cgi?id=32858
    
            * Scripts/modules/cpp_style.py:
            * Scripts/modules/cpp_style_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3679d24..5805b5f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-22  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Adam Barth.
+
+        check-webkit-style should not warn about NULL usage in g_object_{get,set}
+        https://bugs.webkit.org/show_bug.cgi?id=32858
+
+        * Scripts/modules/cpp_style.py:
+        * Scripts/modules/cpp_style_unittest.py:
+
 2009-12-22  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Rubber-stamped by Holger Freyther.
diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/modules/cpp_style.py
index c355001..7361f25 100644
--- a/WebKitTools/Scripts/modules/cpp_style.py
+++ b/WebKitTools/Scripts/modules/cpp_style.py
@@ -2103,6 +2103,11 @@ def check_for_null(filename, clean_lines, line_number, error):
         return
 
     line = clean_lines.elided[line_number]
+
+    # Don't warn about NULL usage in g_object_{get,set}(). See Bug 32858
+    if search(r'\bg_object_[sg]et\b', line):
+        return
+
     if search(r'\bNULL\b', line):
         error(filename, line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
         return
diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/modules/cpp_style_unittest.py
index 5e03df5..2558f18 100644
--- a/WebKitTools/Scripts/modules/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/modules/cpp_style_unittest.py
@@ -3494,6 +3494,14 @@ class WebKitStyleTest(CppStyleTestBase):
             '',
             'foo.m')
 
+        # Make sure that the NULL check does not apply to g_object_{set,get}
+        self.assert_lint(
+            'g_object_get(foo, "prop", &bar, NULL);',
+            '')
+        self.assert_lint(
+            'g_object_set(foo, "prop", bar, 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.
         # FIXME: Implement this.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list