girepository: Rename get_type_init() methods to get_type_init_function_name()

Because they return the function name, not a `GIFunctionInfo` for the
function, or anything else.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2023-12-12 17:54:19 +00:00
parent a00389343a
commit 693f11cd42
5 changed files with 12 additions and 12 deletions

View File

@ -204,7 +204,7 @@ gi_object_info_get_type_name (GIObjectInfo *info)
} }
/** /**
* gi_object_info_get_type_init: * gi_object_info_get_type_init_function_name:
* @info: a #GIObjectInfo * @info: a #GIObjectInfo
* *
* Obtain the function which when called will return the GType * Obtain the function which when called will return the GType
@ -213,7 +213,7 @@ gi_object_info_get_type_name (GIObjectInfo *info)
* Returns: the type init function * Returns: the type init function
*/ */
const gchar * const gchar *
gi_object_info_get_type_init (GIObjectInfo *info) gi_object_info_get_type_init_function_name (GIObjectInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ObjectBlob *blob; ObjectBlob *blob;

View File

@ -83,7 +83,7 @@ GI_AVAILABLE_IN_ALL
const gchar * gi_object_info_get_type_name (GIObjectInfo *info); const gchar * gi_object_info_get_type_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const gchar * gi_object_info_get_type_init (GIObjectInfo *info); const gchar * gi_object_info_get_type_init_function_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
gboolean gi_object_info_get_abstract (GIObjectInfo *info); gboolean gi_object_info_get_abstract (GIObjectInfo *info);

View File

@ -78,7 +78,7 @@ gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
} }
/** /**
* gi_registered_type_info_get_type_init: * gi_registered_type_info_get_type_init_function_name:
* @info: a #GIRegisteredTypeInfo * @info: a #GIRegisteredTypeInfo
* *
* Obtain the type init function for @info. The type init function is the * Obtain the type init function for @info. The type init function is the
@ -90,7 +90,7 @@ gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info)
* passing into g_module_symbol(). * passing into g_module_symbol().
*/ */
const gchar * const gchar *
gi_registered_type_info_get_type_init (GIRegisteredTypeInfo *info) gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
RegisteredTypeBlob *blob; RegisteredTypeBlob *blob;
@ -127,7 +127,7 @@ gi_registered_type_info_get_g_type (GIRegisteredTypeInfo *info)
g_return_val_if_fail (info != NULL, G_TYPE_INVALID); g_return_val_if_fail (info != NULL, G_TYPE_INVALID);
g_return_val_if_fail (GI_IS_REGISTERED_TYPE_INFO (info), G_TYPE_INVALID); g_return_val_if_fail (GI_IS_REGISTERED_TYPE_INFO (info), G_TYPE_INVALID);
type_init = gi_registered_type_info_get_type_init (info); type_init = gi_registered_type_info_get_type_init_function_name (info);
if (type_init == NULL) if (type_init == NULL)
return G_TYPE_NONE; return G_TYPE_NONE;

View File

@ -53,7 +53,7 @@ GI_AVAILABLE_IN_ALL
const gchar * gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info); const gchar * gi_registered_type_info_get_type_name (GIRegisteredTypeInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const gchar * gi_registered_type_info_get_type_init (GIRegisteredTypeInfo *info); const gchar * gi_registered_type_info_get_type_init_function_name (GIRegisteredTypeInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
GType gi_registered_type_info_get_g_type (GIRegisteredTypeInfo *info); GType gi_registered_type_info_get_g_type (GIRegisteredTypeInfo *info);

View File

@ -658,7 +658,7 @@ write_struct_info (const gchar *ns,
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info); deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = gi_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = gi_registered_type_info_get_type_init_function_name ((GIRegisteredTypeInfo*)info);
if (gi_base_info_get_info_type ((GIBaseInfo *) info) == GI_INFO_TYPE_BOXED) if (gi_base_info_get_info_type ((GIBaseInfo *) info) == GI_INFO_TYPE_BOXED)
{ {
@ -844,7 +844,7 @@ write_enum_info (const gchar *ns,
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info); deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = gi_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = gi_registered_type_info_get_type_init_function_name ((GIRegisteredTypeInfo*)info);
error_domain = gi_enum_info_get_error_domain (info); error_domain = gi_enum_info_get_error_domain (info);
if (gi_base_info_get_info_type ((GIBaseInfo *) info) == GI_INFO_TYPE_ENUM) if (gi_base_info_get_info_type ((GIBaseInfo *) info) == GI_INFO_TYPE_ENUM)
@ -1049,7 +1049,7 @@ write_object_info (const gchar *ns,
is_final = gi_object_info_get_final (info); is_final = gi_object_info_get_final (info);
type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = gi_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = gi_registered_type_info_get_type_init_function_name ((GIRegisteredTypeInfo*)info);
xml_start_element (file, "class"); xml_start_element (file, "class");
xml_printf (file, " name=\"%s\"", name); xml_printf (file, " name=\"%s\"", name);
@ -1171,7 +1171,7 @@ write_interface_info (const gchar *ns,
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info); deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = gi_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = gi_registered_type_info_get_type_init_function_name ((GIRegisteredTypeInfo*)info);
xml_start_element (file, "interface"); xml_start_element (file, "interface");
xml_printf (file, " name=\"%s\" glib:type-name=\"%s\" glib:get-type=\"%s\"", xml_printf (file, " name=\"%s\" glib:type-name=\"%s\" glib:get-type=\"%s\"",
name, type_name, type_init); name, type_name, type_init);
@ -1257,7 +1257,7 @@ write_union_info (const gchar *ns,
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info); deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info); type_name = gi_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
type_init = gi_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info); type_init = gi_registered_type_info_get_type_init_function_name ((GIRegisteredTypeInfo*)info);
xml_start_element (file, "union"); xml_start_element (file, "union");
xml_printf (file, " name=\"%s\"", name); xml_printf (file, " name=\"%s\"", name);