diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-03 10:50:21 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-07 04:29:14 -0500 |
commit | b714353e38cf72b6cb2754d413b3688a47624028 (patch) | |
tree | f14a682d4f9a547c7410a3a3317f4bc2c3f17ea4 /tests/scanner/warnlib.h | |
parent | bb1ac9cf2dc450c5d44b1e39e3162ba06069f4a1 (diff) | |
download | gobject-introspection-b714353e38cf72b6cb2754d413b3688a47624028.tar.gz |
tests: Move do_moo to warnlib
We want to warn on unnamed params in declarations to ensure that
all functions are bindable. Thus, we need to move a test containing
unnamed params to WarnLib so it can be tested.
https://bugzilla.gnome.org/show_bug.cgi?id=693098
Diffstat (limited to 'tests/scanner/warnlib.h')
-rw-r--r-- | tests/scanner/warnlib.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/scanner/warnlib.h b/tests/scanner/warnlib.h index 8aca901a..9e448c08 100644 --- a/tests/scanner/warnlib.h +++ b/tests/scanner/warnlib.h @@ -10,4 +10,27 @@ GQuark warnlib_unpaired_error_quark (void); gboolean warnlib_throw_unpaired (GError **error); +/* interface */ +#define WARNLIB_TYPE_WHATEVER (warnlib_whatever_get_type ()) +#define WARNLIB_WHATEVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), WARNLIB_TYPE_WHATEVER, WarnLibWhatever)) +#define WARNLIB_IS_WHATEVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), WARNLIB_TYPE_WHATEVER)) +#define WARNLIB_WHATEVER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), WARNLIB_TYPE_WHATEVER, WarnLibWhateverIface)) + +typedef struct _WarnLibWhateverIface WarnLibWhateverIface; +typedef struct _WarnLibWhatever WarnLibWhatever; + +struct _WarnLibWhateverIface +{ + GTypeInterface parent_iface; + + /* virtual table */ + + /* explicitly test un-named parameters */ + void (*do_moo) (WarnLibWhatever *self, int, gpointer); +}; + +void warnlib_whatever_do_moo (WarnLibWhatever *self, int, gpointer); + +GType warnlib_whatever_get_type (void) G_GNUC_CONST; + #endif |