diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-01-04 09:32:45 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-01-04 09:32:45 +0100 |
commit | eff011ce1d274e9add73fbf71fb8617ba37fb9f8 (patch) | |
tree | 183c2de0f7a564db160470df56878d777b981dee /tests | |
parent | c212cc83bb68f0e269dcfc820f6ec075efa08f7b (diff) | |
download | gobject-introspection-eff011ce1d274e9add73fbf71fb8617ba37fb9f8.tar.gz |
Regress: Add signal returning a GArray
https://bugzilla.gnome.org/show_bug.cgi?id=690514
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scanner/Regress-1.0-expected.gir | 13 | ||||
-rw-r--r-- | tests/scanner/regress.c | 20 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index 7aee6419..f3f9a034 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -1307,6 +1307,19 @@ the introspection client langage.</doc> </parameter> </parameters> </glib:signal> + <glib:signal name="sig-with-intarray-ret" when="last"> + <return-value transfer-ownership="full"> + <array name="GLib.Array"> + <type name="gint"/> + </array> + </return-value> + <parameters> + <parameter name="i" transfer-ownership="none"> + <doc xml:whitespace="preserve">an integer</doc> + <type name="gint"/> + </parameter> + </parameters> + </glib:signal> <glib:signal name="sig-with-obj" when="last"> <doc xml:whitespace="preserve">Test transfer none GObject as a param (tests refcounting). Use with regress_test_obj_emit_sig_with_obj</doc> diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index b7526bfb..06089c38 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -2181,6 +2181,7 @@ enum { REGRESS_TEST_OBJ_SIGNAL_ALL, REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_INT64_PROP, REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_UINT64_PROP, + REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_INTARRAY_RET, N_REGRESS_TEST_OBJ_SIGNALS }; @@ -2387,6 +2388,25 @@ regress_test_obj_class_init (RegressTestObjClass *klass) 1, G_TYPE_UINT64); + /** + * RegressTestObj::sig-with-intarray-ret: + * @self: an object + * @i: an integer + * + * Returns: (array zero-terminated=1) (element-type gint) (transfer full): + */ + regress_test_obj_signals[REGRESS_TEST_OBJ_SIGNAL_SIG_WITH_INTARRAY_RET] = + g_signal_new ("sig-with-intarray-ret", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_VOID__BOXED, + G_TYPE_ARRAY, + 1, + G_TYPE_INT); + gobject_class->set_property = regress_test_obj_set_property; gobject_class->get_property = regress_test_obj_get_property; gobject_class->dispose = regress_test_obj_dispose; |