mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Merge branch '1666-typemodule-casts' into 'master'
gtypemodule: Cast *_init functions to void(*)(void) first Closes #1666 See merge request GNOME/glib!617
This commit is contained in:
commit
6db5101c4f
@ -204,12 +204,12 @@ type_name##_register_type (GTypeModule *type_module) \
|
||||
sizeof (TypeName##Class), \
|
||||
(GBaseInitFunc) NULL, \
|
||||
(GBaseFinalizeFunc) NULL, \
|
||||
(GClassInitFunc) type_name##_class_intern_init, \
|
||||
(GClassFinalizeFunc) type_name##_class_finalize, \
|
||||
(GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \
|
||||
(GClassFinalizeFunc)(void (*)(void)) type_name##_class_finalize, \
|
||||
NULL, /* class_data */ \
|
||||
sizeof (TypeName), \
|
||||
0, /* n_preallocs */ \
|
||||
(GInstanceInitFunc) type_name##_init, \
|
||||
(GInstanceInitFunc)(void (*)(void)) type_name##_init, \
|
||||
NULL /* value_table */ \
|
||||
}; \
|
||||
type_name##_type_id = g_type_module_register_type (type_module, \
|
||||
@ -238,7 +238,7 @@ type_name##_register_type (GTypeModule *type_module) \
|
||||
*/
|
||||
#define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \
|
||||
const GInterfaceInfo g_implement_interface_info = { \
|
||||
(GInterfaceInitFunc) iface_init, NULL, NULL \
|
||||
(GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \
|
||||
}; \
|
||||
g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user