girepository: Rename get_type() methods to get_type_info()

These methods don’t return a `GType`, so when the code gets ported to
`GTypeInstance` in an upcoming commit, that will become quite confusing.

Rename them all to `get_type_info()` instead.

This introduces no functional changes, but it is an API break.

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

Helps: #3155
This commit is contained in:
Philip Withnall 2023-11-28 17:09:26 +00:00
parent a16be963b4
commit 9eabdd7c2e
10 changed files with 22 additions and 22 deletions

View File

@ -291,7 +291,7 @@ gi_arg_info_get_destroy (GIArgInfo *info)
}
/**
* gi_arg_info_get_type:
* gi_arg_info_get_type_info:
* @info: a #GIArgInfo
*
* Obtain the type information for @info.
@ -301,7 +301,7 @@ gi_arg_info_get_destroy (GIArgInfo *info)
* when done.
*/
GITypeInfo *
gi_arg_info_get_type (GIArgInfo *info)
gi_arg_info_get_type_info (GIArgInfo *info)
{
GIRealInfo *rinfo = (GIRealInfo *)info;
@ -317,7 +317,7 @@ gi_arg_info_get_type (GIArgInfo *info)
* @type: (out caller-allocates): Initialized with information about type of @info
*
* Obtain information about a the type of given argument @info; this
* function is a variant of gi_arg_info_get_type() designed for stack
* function is a variant of gi_arg_info_get_type_info() designed for stack
* allocation.
*
* The initialized @type must not be referenced after @info is deallocated.

View File

@ -73,7 +73,7 @@ GI_AVAILABLE_IN_ALL
gint gi_arg_info_get_destroy (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * gi_arg_info_get_type (GIArgInfo *info);
GITypeInfo * gi_arg_info_get_type_info (GIArgInfo *info);
GI_AVAILABLE_IN_ALL
void gi_arg_info_load_type (GIArgInfo *info,

View File

@ -666,7 +666,7 @@ gi_callable_info_invoke (GIFunctionInfo *info,
switch (gi_arg_info_get_direction (ainfo))
{
case GI_DIRECTION_IN:
tinfo = gi_arg_info_get_type (ainfo);
tinfo = gi_arg_info_get_type_info (ainfo);
atypes[i+offset] = gi_type_info_get_ffi_type (tinfo);
gi_base_info_unref ((GIBaseInfo *)ainfo);
gi_base_info_unref ((GIBaseInfo *)tinfo);

View File

@ -40,13 +40,13 @@
* GIConstantInfo represents a constant.
*
* A constant has a type associated which can be obtained by calling
* gi_constant_info_get_type() and a value, which can be obtained by
* gi_constant_info_get_type_info() and a value, which can be obtained by
* calling gi_constant_info_get_value().
*/
/**
* gi_constant_info_get_type:
* gi_constant_info_get_type_info:
* @info: a #GIConstantInfo
*
* Obtain the type of the constant as a #GITypeInfo.
@ -55,7 +55,7 @@
* gi_base_info_unref() when done.
*/
GITypeInfo *
gi_constant_info_get_type (GIConstantInfo *info)
gi_constant_info_get_type_info (GIConstantInfo *info)
{
GIRealInfo *rinfo = (GIRealInfo *)info;

View File

@ -43,7 +43,7 @@ G_BEGIN_DECLS
GI_AVAILABLE_IN_ALL
GITypeInfo * gi_constant_info_get_type (GIConstantInfo *info);
GITypeInfo * gi_constant_info_get_type_info (GIConstantInfo *info);
GI_AVAILABLE_IN_ALL
void gi_constant_info_free_value (GIConstantInfo *info,

View File

@ -127,7 +127,7 @@ gi_field_info_get_offset (GIFieldInfo *info)
}
/**
* gi_field_info_get_type:
* gi_field_info_get_type_info:
* @info: a #GIFieldInfo
*
* Obtain the type of a field as a #GITypeInfo.
@ -136,7 +136,7 @@ gi_field_info_get_offset (GIFieldInfo *info)
* gi_base_info_unref() when done.
*/
GITypeInfo *
gi_field_info_get_type (GIFieldInfo *info)
gi_field_info_get_type_info (GIFieldInfo *info)
{
GIRealInfo *rinfo = (GIRealInfo *)info;
Header *header = (Header *)rinfo->typelib->data;
@ -190,7 +190,7 @@ gi_field_info_get_field (GIFieldInfo *field_info,
return FALSE;
offset = gi_field_info_get_offset (field_info);
type_info = gi_field_info_get_type (field_info);
type_info = gi_field_info_get_type_info (field_info);
if (gi_type_info_is_pointer (type_info))
{
@ -384,7 +384,7 @@ gi_field_info_set_field (GIFieldInfo *field_info,
return FALSE;
offset = gi_field_info_get_offset (field_info);
type_info = gi_field_info_get_type (field_info);
type_info = gi_field_info_get_type_info (field_info);
if (!gi_type_info_is_pointer (type_info))
{

View File

@ -53,7 +53,7 @@ GI_AVAILABLE_IN_ALL
gint gi_field_info_get_offset (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * gi_field_info_get_type (GIFieldInfo *info);
GITypeInfo * gi_field_info_get_type_info (GIFieldInfo *info);
GI_AVAILABLE_IN_ALL
gboolean gi_field_info_get_field (GIFieldInfo *field_info,

View File

@ -80,7 +80,7 @@ gi_property_info_get_flags (GIPropertyInfo *info)
}
/**
* gi_property_info_get_type:
* gi_property_info_get_type_info:
* @info: a #GIPropertyInfo
*
* Obtain the type information for the property @info.
@ -89,7 +89,7 @@ gi_property_info_get_flags (GIPropertyInfo *info)
* gi_base_info_unref() when done.
*/
GITypeInfo *
gi_property_info_get_type (GIPropertyInfo *info)
gi_property_info_get_type_info (GIPropertyInfo *info)
{
GIRealInfo *rinfo = (GIRealInfo *)info;

View File

@ -46,7 +46,7 @@ GI_AVAILABLE_IN_ALL
GParamFlags gi_property_info_get_flags (GIPropertyInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * gi_property_info_get_type (GIPropertyInfo *info);
GITypeInfo *gi_property_info_get_type_info (GIPropertyInfo *info);
GI_AVAILABLE_IN_ALL
GITransfer gi_property_info_get_ownership_transfer (GIPropertyInfo *info);

View File

@ -423,13 +423,13 @@ write_field_info (const gchar *ns,
write_attributes (file, (GIBaseInfo*) info);
type = gi_field_info_get_type (info);
type = gi_field_info_get_type_info (info);
if (branch)
{
xml_printf (file, " branch=\"");
gi_base_info_unref ((GIBaseInfo *)type);
type = gi_constant_info_get_type (branch);
type = gi_constant_info_get_type_info (branch);
gi_constant_info_get_value (branch, &value);
write_constant_value (ns, type, &value, file);
xml_printf (file, "\"");
@ -555,7 +555,7 @@ write_callable_info (const gchar *ns,
write_attributes (file, (GIBaseInfo*) arg);
type = gi_arg_info_get_type (arg);
type = gi_arg_info_get_type_info (arg);
write_type_info (ns, type, file);
xml_end_element (file, "parameter");
@ -813,7 +813,7 @@ write_constant_info (const gchar *ns,
xml_start_element (file, "constant");
xml_printf (file, " name=\"%s\"", name);
type = gi_constant_info_get_type (info);
type = gi_constant_info_get_type_info (info);
xml_printf (file, " value=\"");
gi_constant_info_get_value (info, &value);
@ -1020,7 +1020,7 @@ write_property_info (const gchar *ns,
write_attributes (file, (GIBaseInfo*) info);
type = gi_property_info_get_type (info);
type = gi_property_info_get_type_info (info);
write_type_info (ns, type, file);