giobjectinfo: Rename get_*_function() methods to get_*_function_name()

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

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

Helps: #3155
This commit is contained in:
Philip Withnall 2023-12-12 18:07:50 +00:00
parent 030f4f003c
commit 15660b49b5
3 changed files with 24 additions and 24 deletions

View File

@ -904,18 +904,18 @@ _get_func(GIObjectInfo *info,
} }
/** /**
* gi_object_info_get_ref_function: * gi_object_info_get_ref_function_name:
* @info: a #GIObjectInfo * @info: a #GIObjectInfo
* *
* Obtain the symbol name of the function that should be called to ref this * Obtain the symbol name of the function that should be called to ref this
* object type. It's mainly used fundamental types. The type signature for * object type. It's mainly used fundamental types. The type signature for
* the symbol is %GIObjectInfoRefFunction, to fetch the function pointer * the symbol is %GIObjectInfoRefFunction, to fetch the function pointer
* see gi_object_info_get_ref_function(). * see gi_object_info_get_ref_function_name().
* *
* Returns: (nullable): the symbol or %NULL * Returns: (nullable): the symbol or %NULL
*/ */
const char * const char *
gi_object_info_get_ref_function (GIObjectInfo *info) gi_object_info_get_ref_function_name (GIObjectInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ObjectBlob *blob; ObjectBlob *blob;
@ -948,22 +948,22 @@ gi_object_info_get_ref_function_pointer (GIObjectInfo *info)
g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL); g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
return (GIObjectInfoRefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_ref_function); return (GIObjectInfoRefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_ref_function_name);
} }
/** /**
* gi_object_info_get_unref_function: * gi_object_info_get_unref_function_name:
* @info: a #GIObjectInfo * @info: a #GIObjectInfo
* *
* Obtain the symbol name of the function that should be called to unref this * Obtain the symbol name of the function that should be called to unref this
* object type. It's mainly used fundamental types. The type signature for * object type. It's mainly used fundamental types. The type signature for
* the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer * the symbol is %GIObjectInfoUnrefFunction, to fetch the function pointer
* see gi_object_info_get_unref_function(). * see gi_object_info_get_unref_function_name().
* *
* Returns: (nullable): the symbol or %NULL * Returns: (nullable): the symbol or %NULL
*/ */
const char * const char *
gi_object_info_get_unref_function (GIObjectInfo *info) gi_object_info_get_unref_function_name (GIObjectInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ObjectBlob *blob; ObjectBlob *blob;
@ -996,23 +996,23 @@ gi_object_info_get_unref_function_pointer (GIObjectInfo *info)
g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL); g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
return (GIObjectInfoUnrefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_unref_function); return (GIObjectInfoUnrefFunction)_get_func(info, (SymbolGetter)gi_object_info_get_unref_function_name);
} }
/** /**
* gi_object_info_get_set_value_function: * gi_object_info_get_set_value_function_name:
* @info: a #GIObjectInfo * @info: a #GIObjectInfo
* *
* Obtain the symbol name of the function that should be called to convert * Obtain the symbol name of the function that should be called to convert
* set a GValue giving an object instance pointer of this object type. * set a GValue giving an object instance pointer of this object type.
* I's mainly used fundamental types. The type signature for the symbol * I's mainly used fundamental types. The type signature for the symbol
* is %GIObjectInfoSetValueFunction, to fetch the function pointer * is %GIObjectInfoSetValueFunction, to fetch the function pointer
* see gi_object_info_get_set_value_function(). * see gi_object_info_get_set_value_function_name().
* *
* Returns: (nullable): the symbol or %NULL * Returns: (nullable): the symbol or %NULL
*/ */
const char * const char *
gi_object_info_get_set_value_function (GIObjectInfo *info) gi_object_info_get_set_value_function_name (GIObjectInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ObjectBlob *blob; ObjectBlob *blob;
@ -1045,23 +1045,23 @@ gi_object_info_get_set_value_function_pointer (GIObjectInfo *info)
g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL); g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
return (GIObjectInfoSetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_set_value_function); return (GIObjectInfoSetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_set_value_function_name);
} }
/** /**
* gi_object_info_get_get_value_function: * gi_object_info_get_get_value_function_name:
* @info: a #GIObjectInfo * @info: a #GIObjectInfo
* *
* Obtain the symbol name of the function that should be called to convert * Obtain the symbol name of the function that should be called to convert
* an object instance pointer of this object type to a GValue. * an object instance pointer of this object type to a GValue.
* I's mainly used fundamental types. The type signature for the symbol * I's mainly used fundamental types. The type signature for the symbol
* is %GIObjectInfoGetValueFunction, to fetch the function pointer * is %GIObjectInfoGetValueFunction, to fetch the function pointer
* see gi_object_info_get_get_value_function(). * see gi_object_info_get_get_value_function_name().
* *
* Returns: (nullable): the symbol or %NULL * Returns: (nullable): the symbol or %NULL
*/ */
const char * const char *
gi_object_info_get_get_value_function (GIObjectInfo *info) gi_object_info_get_get_value_function_name (GIObjectInfo *info)
{ {
GIRealInfo *rinfo = (GIRealInfo *)info; GIRealInfo *rinfo = (GIRealInfo *)info;
ObjectBlob *blob; ObjectBlob *blob;
@ -1094,7 +1094,7 @@ gi_object_info_get_get_value_function_pointer (GIObjectInfo *info)
g_return_val_if_fail (info != NULL, NULL); g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL); g_return_val_if_fail (GI_IS_OBJECT_INFO (info), NULL);
return (GIObjectInfoGetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_get_value_function); return (GIObjectInfoGetValueFunction)_get_func(info, (SymbolGetter)gi_object_info_get_get_value_function_name);
} }
void void

View File

@ -177,28 +177,28 @@ GIStructInfo * gi_object_info_get_class_struct (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const char * gi_object_info_get_ref_function (GIObjectInfo *info); const char * gi_object_info_get_ref_function_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
GIObjectInfoRefFunction gi_object_info_get_ref_function_pointer (GIObjectInfo *info); GIObjectInfoRefFunction gi_object_info_get_ref_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const char * gi_object_info_get_unref_function (GIObjectInfo *info); const char * gi_object_info_get_unref_function_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
GIObjectInfoUnrefFunction gi_object_info_get_unref_function_pointer (GIObjectInfo *info); GIObjectInfoUnrefFunction gi_object_info_get_unref_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const char * gi_object_info_get_set_value_function (GIObjectInfo *info); const char * gi_object_info_get_set_value_function_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
GIObjectInfoSetValueFunction gi_object_info_get_set_value_function_pointer (GIObjectInfo *info); GIObjectInfoSetValueFunction gi_object_info_get_set_value_function_pointer (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
const char * gi_object_info_get_get_value_function (GIObjectInfo *info); const char * gi_object_info_get_get_value_function_name (GIObjectInfo *info);
GI_AVAILABLE_IN_ALL GI_AVAILABLE_IN_ALL
GIObjectInfoGetValueFunction gi_object_info_get_get_value_function_pointer (GIObjectInfo *info); GIObjectInfoGetValueFunction gi_object_info_get_get_value_function_pointer (GIObjectInfo *info);

View File

@ -1077,19 +1077,19 @@ write_object_info (const gchar *ns,
if (is_fundamental) if (is_fundamental)
xml_printf (file, " glib:fundamental=\"1\""); xml_printf (file, " glib:fundamental=\"1\"");
func = gi_object_info_get_unref_function (info); func = gi_object_info_get_unref_function_name (info);
if (func) if (func)
xml_printf (file, " glib:unref-function=\"%s\"", func); xml_printf (file, " glib:unref-function=\"%s\"", func);
func = gi_object_info_get_ref_function (info); func = gi_object_info_get_ref_function_name (info);
if (func) if (func)
xml_printf (file, " glib:ref-function=\"%s\"", func); xml_printf (file, " glib:ref-function=\"%s\"", func);
func = gi_object_info_get_set_value_function (info); func = gi_object_info_get_set_value_function_name (info);
if (func) if (func)
xml_printf (file, " glib:set-value-function=\"%s\"", func); xml_printf (file, " glib:set-value-function=\"%s\"", func);
func = gi_object_info_get_get_value_function (info); func = gi_object_info_get_get_value_function_name (info);
if (func) if (func)
xml_printf (file, " glib:get-value-function=\"%s\"", func); xml_printf (file, " glib:get-value-function=\"%s\"", func);