gobject-introspection r1021 - in trunk: . tests/everything



Author: johan
Date: Mon Jan 12 21:00:46 2009
New Revision: 1021
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=1021&view=rev

Log:
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



Modified:
   trunk/ChangeLog
   trunk/tests/everything/everything.c
   trunk/tests/everything/everything.h

Modified: trunk/tests/everything/everything.c
==============================================================================
--- trunk/tests/everything/everything.c	(original)
+++ trunk/tests/everything/everything.c	Mon Jan 12 21:00:46 2009
@@ -621,6 +621,16 @@
 	  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)
 {

Modified: trunk/tests/everything/everything.h
==============================================================================
--- trunk/tests/everything/everything.h	(original)
+++ trunk/tests/everything/everything.h	Mon Jan 12 21:00:46 2009
@@ -131,10 +131,12 @@
   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
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]