[glib] Cast iface_init to GInterfaceInitFunc



commit b35fa1994d6607376136716c133dd88433706ee8
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 26 12:30:14 2009 +0100

    Cast iface_init to GInterfaceInitFunc
    
    This is in line with what all other type define macros do.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=508157

 gobject/gtypemodule.h       |    2 +-
 tests/gobject/dynamictype.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gobject/gtypemodule.h b/gobject/gtypemodule.h
index a1eec3e..464531c 100644
--- a/gobject/gtypemodule.h
+++ b/gobject/gtypemodule.h
@@ -232,7 +232,7 @@ type_name##_register_type (GTypeModule *type_module) \
  */
 #define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init)       { \
   const GInterfaceInfo g_implement_interface_info = { \
-    iface_init, NULL, NULL \
+    (GInterfaceInitFunc) iface_init, NULL, NULL      \
   }; \
   g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
 }
diff --git a/tests/gobject/dynamictype.c b/tests/gobject/dynamictype.c
index bef42ee..9482dfc 100644
--- a/tests/gobject/dynamictype.c
+++ b/tests/gobject/dynamictype.c
@@ -93,8 +93,7 @@ dynamic_object_class_finalize (DynamicObjectClass *class)
 }
 
 static void
-dynamic_object_iface_init (gpointer g_iface,
-			   gpointer iface_data)
+dynamic_object_iface_init (TestIface *iface)
 {
 }
 



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