Bug 563386 – scanner ignores "const" on boxed return values
authorHavoc Pennington <hp@pobox.com>
Mon, 12 Jan 2009 21:00:46 +0000 (21:00 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 12 Jan 2009 21:00:46 +0000 (21:00 +0000)
2009-01-12  Havoc Pennington  <hp@pobox.com>

        Bug 563386 – scanner ignores "const" on boxed return values

        * tests/everything/everything.c (test_simple_boxed_a_const_return):
        * tests/everything/everything.h:

        This adds just the tests specified in the bug above, the fix itself
        was included in Bug 563794

svn path=/trunk/; revision=1021

ChangeLog
tests/everything/everything.c
tests/everything/everything.h

index dcb977e..d94ffd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-12  Havoc Pennington  <hp@pobox.com>
+
+       Bug 563386 – scanner ignores "const" on boxed return values
+
+       * tests/everything/everything.c (test_simple_boxed_a_const_return):
+       * tests/everything/everything.h:
+
+       This adds just the tests specified in the bug above, the fix itself
+       was included in Bug 563794
+
 2009-01-03  Andreas Rottmann  <a.rottmann@gmx.at>
 
        Bug 566404 – Annotations for GLib
index fc4fcda..a8f50e9 100644 (file)
@@ -621,6 +621,16 @@ test_simple_boxed_a_equals (TestSimpleBoxedA *a,
          a->some_double == other_a->some_double);
 }
 
+const TestSimpleBoxedA*
+test_simple_boxed_a_const_return (void)
+{
+  static TestSimpleBoxedA simple_a = {
+    5, 6, 7.0
+  };
+
+  return &simple_a;
+}
+
 static void
 test_simple_boxed_b_free (TestSimpleBoxedB *a)
 {
index 61a6b7d..22f1838 100644 (file)
@@ -131,10 +131,12 @@ struct _TestSimpleBoxedA
   TestEnum some_enum;
 };
 
-GType             test_simple_boxed_a_get_type (void);
-TestSimpleBoxedA *test_simple_boxed_a_copy     (TestSimpleBoxedA *a);
-gboolean          test_simple_boxed_a_equals   (TestSimpleBoxedA *a,
-                                               TestSimpleBoxedA *other_a);
+GType                   test_simple_boxed_a_get_type     (void);
+TestSimpleBoxedA *      test_simple_boxed_a_copy         (TestSimpleBoxedA *a);
+gboolean                test_simple_boxed_a_equals       (TestSimpleBoxedA *a,
+                                                          TestSimpleBoxedA *other_a);
+const TestSimpleBoxedA *test_simple_boxed_a_const_return (void);
+
 
 struct _TestSimpleBoxedB
 {