mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gitypeinfo: Rename get_array_length() to get_array_length_index()
It returns the index of the array length argument, not the length itself. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3155
This commit is contained in:
parent
23d9a79c62
commit
299315007f
@ -271,7 +271,7 @@ write_type_info (const gchar *ns,
|
||||
|
||||
type = gi_type_info_get_param_type (info, 0);
|
||||
|
||||
length = gi_type_info_get_array_length (info);
|
||||
length = gi_type_info_get_array_length_index (info);
|
||||
if (length >= 0)
|
||||
xml_printf (file, " length=\"%d\"", length);
|
||||
|
||||
|
@ -226,17 +226,17 @@ gi_type_info_get_interface (GITypeInfo *info)
|
||||
}
|
||||
|
||||
/**
|
||||
* gi_type_info_get_array_length:
|
||||
* gi_type_info_get_array_length_index:
|
||||
* @info: a #GITypeInfo
|
||||
*
|
||||
* Obtain the position of the argument which gives the array length of the type.
|
||||
* The type tag must be a `GI_TYPE_TAG_ARRAY` or `-1` will be returned.
|
||||
*
|
||||
* Returns: the array length, or `-1` if the type is not an array
|
||||
* Returns: the array length argument index, or `-1` if the type is not an array
|
||||
* Since: 2.80
|
||||
*/
|
||||
gint
|
||||
gi_type_info_get_array_length (GITypeInfo *info)
|
||||
gi_type_info_get_array_length_index (GITypeInfo *info)
|
||||
{
|
||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||
SimpleTypeBlob *type;
|
||||
|
@ -96,7 +96,7 @@ GI_AVAILABLE_IN_ALL
|
||||
GIBaseInfo * gi_type_info_get_interface (GITypeInfo *info);
|
||||
|
||||
GI_AVAILABLE_IN_ALL
|
||||
gint gi_type_info_get_array_length (GITypeInfo *info);
|
||||
gint gi_type_info_get_array_length_index (GITypeInfo *info);
|
||||
|
||||
GI_AVAILABLE_IN_ALL
|
||||
gssize gi_type_info_get_array_fixed_size (GITypeInfo *info);
|
||||
|
Loading…
Reference in New Issue
Block a user