mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gitypeinfo: Use gssize to return the array length index
Use a bigger integer value, even though int is more than enough, but to make it clearer that we're returning a size-related value.
This commit is contained in:
parent
a3d29b6437
commit
de8ac339fb
@ -244,7 +244,7 @@ write_type_info (const char *ns,
|
|||||||
}
|
}
|
||||||
else if (tag == GI_TYPE_TAG_ARRAY)
|
else if (tag == GI_TYPE_TAG_ARRAY)
|
||||||
{
|
{
|
||||||
int length;
|
gssize length;
|
||||||
gssize size;
|
gssize size;
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ write_type_info (const char *ns,
|
|||||||
|
|
||||||
length = gi_type_info_get_array_length_index (info);
|
length = gi_type_info_get_array_length_index (info);
|
||||||
if (length >= 0)
|
if (length >= 0)
|
||||||
xml_printf (file, " length=\"%d\"", length);
|
xml_printf (file, " length=\"%" G_GSSIZE_FORMAT "\"", length);
|
||||||
|
|
||||||
size = gi_type_info_get_array_fixed_size (info);
|
size = gi_type_info_get_array_fixed_size (info);
|
||||||
if (size >= 0)
|
if (size >= 0)
|
||||||
|
@ -241,7 +241,7 @@ gi_type_info_get_interface (GITypeInfo *info)
|
|||||||
* or it has no length argument
|
* or it has no length argument
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
int
|
gssize
|
||||||
gi_type_info_get_array_length_index (GITypeInfo *info)
|
gi_type_info_get_array_length_index (GITypeInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@ -96,7 +96,7 @@ GI_AVAILABLE_IN_ALL
|
|||||||
GIBaseInfo * gi_type_info_get_interface (GITypeInfo *info);
|
GIBaseInfo * gi_type_info_get_interface (GITypeInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
int gi_type_info_get_array_length_index (GITypeInfo *info);
|
gssize gi_type_info_get_array_length_index (GITypeInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gssize gi_type_info_get_array_fixed_size (GITypeInfo *info);
|
gssize gi_type_info_get_array_fixed_size (GITypeInfo *info);
|
||||||
|
Loading…
Reference in New Issue
Block a user