summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-20 15:54:41 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-20 15:55:12 +0100
commita258d3fdfbd0f598bfe287b656f240d95f6d4bc1 (patch)
tree9d9d9c09755e53efed23490b63e93977550f2b50
parent78200c7419fbc5dd15bc74a3e1ad0ba290ff2c81 (diff)
downloadgobject-introspection-a258d3fdfbd0f598bfe287b656f240d95f6d4bc1.tar.gz
Add GIMarshallingTests.Interface2
so we can test conflicts when two bases have a vfunc with the same name.
-rw-r--r--tests/gimarshallingtests.c21
-rw-r--r--tests/gimarshallingtests.h23
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index fc2cfaf7..cf2827b6 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -3197,6 +3197,27 @@ gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *t
}
+static void
+gi_marshalling_tests_interface2_class_init(void *g_iface)
+{
+}
+
+GType
+gi_marshalling_tests_interface2_get_type(void)
+{
+ static GType type = 0;
+ if (type == 0) {
+ type = g_type_register_static_simple (G_TYPE_INTERFACE,
+ "GIMarshallingTestsInterface2",
+ sizeof (GIMarshallingTestsInterface2Iface),
+ (GClassInitFunc) gi_marshalling_tests_interface2_class_init,
+ 0, NULL, 0);
+ }
+
+ return type;
+}
+
+
/**
* gi_marshalling_tests_int_out_out:
* @int0: (out):
diff --git a/tests/gimarshallingtests.h b/tests/gimarshallingtests.h
index cc992ca1..f17c747f 100644
--- a/tests/gimarshallingtests.h
+++ b/tests/gimarshallingtests.h
@@ -674,6 +674,29 @@ void gi_marshalling_tests_interface_test_int8_in (GIMarshallingTestsInterface *s
void gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *test_iface, gint8 in);
+/* GIMarshallingTestsInterface2 allows us testing vfunc clashes when a class'
+ vfunc implementation ambiguously relates to its prototype */
+
+#define GI_MARSHALLING_TESTS_TYPE_INTERFACE2 (gi_marshalling_tests_interface2_get_type ())
+#define GI_MARSHALLING_TESTS_INTERFACE2(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2))
+#define GI_MARSHALLING_TESTS_IS_INTERFACE2(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2))
+#define GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE2 ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2Iface))
+
+typedef struct _GIMarshallingTestsInterface2 GIMarshallingTestsInterface2;
+typedef struct _GIMarshallingTestsInterface2Iface GIMarshallingTestsInterface2Iface;
+
+struct _GIMarshallingTestsInterface2Iface {
+ GTypeInterface base_iface;
+
+ /**
+ * GIMarshallingTestsInterface2Iface::test_int8_in:
+ * @in: (in):
+ */
+ void (* test_int8_in) (GIMarshallingTestsInterface2 *self, gint8 in);
+};
+
+GType gi_marshalling_tests_interface2_get_type (void) G_GNUC_CONST;
+
/* Multiple output arguments */