summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-07-15 22:47:53 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2012-07-16 20:33:37 -0400
commit14eefe4776bc1e08238bfcf53619e8d260413834 (patch)
treee70d1344631452254fdb25dd9ebb4102e765a597 /tests
parent5ae44d85d847d32699891f61cf1f75c3c4fdfe0e (diff)
downloadgobject-introspection-14eefe4776bc1e08238bfcf53619e8d260413834.tar.gz
regress: Use G_DEFINE_INTERFACE
https://bugzilla.gnome.org/show_bug.cgi?id=679981
Diffstat (limited to 'tests')
-rw-r--r--tests/scanner/regress.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 43db1b06..910f01a5 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -3429,24 +3429,13 @@ regress_test_owned_gerror_callback (RegressTestCallbackOwnedGError callback)
/* interface */
static void
-regress_test_interface_class_init(void *g_iface)
+regress_test_interface_default_init(RegressTestInterfaceIface *iface)
{
}
-GType
-regress_test_interface_get_type(void)
-{
- static GType type = 0;
- if (type == 0) {
- type = g_type_register_static_simple (G_TYPE_INTERFACE,
- "RegressTestInterface",
- sizeof (RegressTestInterfaceIface),
- (GClassInitFunc) regress_test_interface_class_init,
- 0, NULL, 0);
- }
+typedef RegressTestInterfaceIface RegressTestInterfaceInterface;
+G_DEFINE_INTERFACE (RegressTestInterface, regress_test_interface, G_TYPE_OBJECT)
- return type;
-}
/* gobject with non-standard prefix */
G_DEFINE_TYPE(RegressTestWi8021x, regress_test_wi_802_1x, G_TYPE_OBJECT);