summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2009-01-12 21:00:46 +0000
committerJohan Dahlin <johan@src.gnome.org>2009-01-12 21:00:46 +0000
commit13e0c1c74eb7fa3fa0a7089aa1cb733d07855139 (patch)
treea81e3995a51ca901540374857561ba4321364470
parent8f67472d52cabfeb32f7d6b6dc3457a94dda0174 (diff)
downloadgobject-introspection-13e0c1c74eb7fa3fa0a7089aa1cb733d07855139.tar.gz
Bug 563386 – scanner ignores "const" on boxed return values
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
-rw-r--r--ChangeLog10
-rw-r--r--tests/everything/everything.c10
-rw-r--r--tests/everything/everything.h10
3 files changed, 26 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index dcb977e9..d94ffd69 100644
--- 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
diff --git a/tests/everything/everything.c b/tests/everything/everything.c
index fc4fcda5..a8f50e95 100644
--- a/tests/everything/everything.c
+++ b/tests/everything/everything.c
@@ -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)
{
diff --git a/tests/everything/everything.h b/tests/everything/everything.h
index 61a6b7d9..22f18383 100644
--- a/tests/everything/everything.h
+++ b/tests/everything/everything.h
@@ -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
{