mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gicallableinfo: Make abstract and add derived types
Previously (and incorrectly), `GICallableInfo`, `GIFunctionInfo`, `GICallbackInfo`, `GISignalInfo` and `GIVFuncInfo` were all derived directly from `GIBaseInfo`. `GICallableInfo` is supposed to represent all of the other types, though, so that type hierarchy was incorrect. It dated from when all the types were aliases of each other and the type management was done entirely at runtime. Fix that by making the other four types derive from `GICallableInfo`, and marking `GICallableInfo` as abstract. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3216
This commit is contained in:
parent
4d5b6599fc
commit
d82675ffd3
@ -284,9 +284,9 @@ gi_base_info_init_types (void)
|
||||
}
|
||||
types[] =
|
||||
{
|
||||
{ GI_INFO_TYPE_CALLABLE, "GICallableInfo", sizeof (GICallableInfo), gi_callable_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_FUNCTION, "GIFunctionInfo", sizeof (GIFunctionInfo), gi_function_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_CALLBACK, "GICallbackInfo", sizeof (GICallbackInfo), gi_callback_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_CALLABLE, "GICallableInfo", sizeof (GICallableInfo), gi_callable_info_class_init, 0, G_TYPE_FLAG_ABSTRACT },
|
||||
{ GI_INFO_TYPE_FUNCTION, "GIFunctionInfo", sizeof (GIFunctionInfo), gi_function_info_class_init, GI_INFO_TYPE_CALLABLE, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_CALLBACK, "GICallbackInfo", sizeof (GICallbackInfo), gi_callback_info_class_init, GI_INFO_TYPE_CALLABLE, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_REGISTERED_TYPE, "GIRegisteredTypeInfo", sizeof (GIRegisteredTypeInfo), gi_registered_type_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_STRUCT, "GIStructInfo", sizeof (GIStructInfo), gi_struct_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_UNION, "GIUnionInfo", sizeof (GIUnionInfo), gi_union_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
@ -295,8 +295,8 @@ gi_base_info_init_types (void)
|
||||
{ GI_INFO_TYPE_INTERFACE, "GIInterfaceInfo", sizeof (GIInterfaceInfo), gi_interface_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_CONSTANT, "GIConstantInfo", sizeof (GIConstantInfo), gi_constant_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_VALUE, "GIValueInfo", sizeof (GIValueInfo), gi_value_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_SIGNAL, "GISignalInfo", sizeof (GISignalInfo), gi_signal_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_VFUNC, "GIVFuncInfo", sizeof (GIVFuncInfo), gi_vfunc_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_SIGNAL, "GISignalInfo", sizeof (GISignalInfo), gi_signal_info_class_init, GI_INFO_TYPE_CALLABLE, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_VFUNC, "GIVFuncInfo", sizeof (GIVFuncInfo), gi_vfunc_info_class_init, GI_INFO_TYPE_CALLABLE, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_PROPERTY, "GIPropertyInfo", sizeof (GIPropertyInfo), gi_property_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_FIELD, "GIFieldInfo", sizeof (GIFieldInfo), gi_field_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
{ GI_INFO_TYPE_ARG, "GIArgInfo", sizeof (GIArgInfo), gi_arg_info_class_init, 0, G_TYPE_FLAG_NONE },
|
||||
|
@ -68,7 +68,7 @@ void gi_callable_info_class_init (gpointer g_class,
|
||||
|
||||
struct _GIFunctionInfo
|
||||
{
|
||||
GIBaseInfo parent;
|
||||
GICallableInfo parent;
|
||||
};
|
||||
|
||||
void gi_function_info_class_init (gpointer g_class,
|
||||
@ -76,7 +76,7 @@ void gi_function_info_class_init (gpointer g_class,
|
||||
|
||||
struct _GICallbackInfo
|
||||
{
|
||||
GIBaseInfo parent;
|
||||
GICallableInfo parent;
|
||||
};
|
||||
|
||||
void gi_callback_info_class_init (gpointer g_class,
|
||||
@ -148,7 +148,7 @@ void gi_value_info_class_init (gpointer g_class,
|
||||
|
||||
struct _GISignalInfo
|
||||
{
|
||||
GIBaseInfo parent;
|
||||
GICallableInfo parent;
|
||||
};
|
||||
|
||||
void gi_signal_info_class_init (gpointer g_class,
|
||||
@ -156,7 +156,7 @@ void gi_signal_info_class_init (gpointer g_class,
|
||||
|
||||
struct _GIVFuncInfo
|
||||
{
|
||||
GIBaseInfo parent;
|
||||
GICallableInfo parent;
|
||||
};
|
||||
|
||||
void gi_vfunc_info_class_init (gpointer g_class,
|
||||
|
Loading…
Reference in New Issue
Block a user