[gobject-introspection] Add GIMarshallingTests.Interface2



commit a258d3fdfbd0f598bfe287b656f240d95f6d4bc1
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Thu Jan 20 15:54:41 2011 +0100

    Add GIMarshallingTests.Interface2
    
    so we can test conflicts when two bases have a vfunc with the
    same name.

 tests/gimarshallingtests.c |   21 +++++++++++++++++++++
 tests/gimarshallingtests.h |   23 +++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index fc2cfaf..cf2827b 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 cc992ca..f17c747 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 */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]