From 130a49c083aa74fccc218a810d353866dbf69e72 Mon Sep 17 00:00:00 2001 From: Simon Feltman Date: Wed, 10 Oct 2012 16:20:50 -0700 Subject: [gobject-introspection] Add test method for GDestroy with no user data Added regress_test_callback_destroy_notify_no_user_data. Updated Regress-1.0-expected.gir https://bugzilla.gnome.org/show_bug.cgi?id=685922 --- tests/scanner/Regress-1.0-expected.gir | 20 ++++++++++++++++++++ tests/scanner/regress.c | 14 ++++++++++++++ tests/scanner/regress.h | 2 ++ 3 files changed, 36 insertions(+) diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index a3e77db1..8d123f7a 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -2307,6 +2307,26 @@ is invoked. + + Adds a scope notified callback with no user data. This can invoke an error +condition in bindings which needs to be tested. + + + + + + + + + + + + diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c index 2fba9fd5..c6ca6b74 100644 --- a/tests/scanner/regress.c +++ b/tests/scanner/regress.c @@ -3323,6 +3323,20 @@ regress_test_callback_destroy_notify (RegressTestCallbackUserData callback, return retval; } +/** + * regress_test_callback_destroy_notify_no_user_data: + * @callback: (scope notified): + * + * Adds a scope notified callback with no user data. This can invoke an error + * condition in bindings which needs to be tested. + **/ +int +regress_test_callback_destroy_notify_no_user_data (RegressTestCallbackUserData callback, + GDestroyNotify notify) +{ + return regress_test_callback_destroy_notify(callback, NULL, notify); +} + /** * regress_test_callback_thaw_notifications: * diff --git a/tests/scanner/regress.h b/tests/scanner/regress.h index f2dae494..635ea7bd 100644 --- a/tests/scanner/regress.h +++ b/tests/scanner/regress.h @@ -677,6 +677,8 @@ int regress_test_callback_user_data (RegressTestCallbackUserData callback, int regress_test_callback_destroy_notify (RegressTestCallbackUserData callback, gpointer user_data, GDestroyNotify notify); +int regress_test_callback_destroy_notify_no_user_data (RegressTestCallbackUserData callback, + GDestroyNotify notify); int regress_test_callback_thaw_notifications (void); void regress_test_callback_async (RegressTestCallbackUserData callback, gpointer user_data); -- cgit v1.2.1