diff --git a/girepository/girwriter.c b/girepository/girwriter.c index 22b366bd2..6c52ed054 100644 --- a/girepository/girwriter.c +++ b/girepository/girwriter.c @@ -244,7 +244,7 @@ write_type_info (const char *ns, } else if (tag == GI_TYPE_TAG_ARRAY) { - int length; + gssize length; gssize size; const char *name = NULL; @@ -273,7 +273,7 @@ write_type_info (const char *ns, length = gi_type_info_get_array_length_index (info); 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); if (size >= 0) diff --git a/girepository/gitypeinfo.c b/girepository/gitypeinfo.c index 349e0f879..5086ec2a2 100644 --- a/girepository/gitypeinfo.c +++ b/girepository/gitypeinfo.c @@ -241,7 +241,7 @@ gi_type_info_get_interface (GITypeInfo *info) * or it has no length argument * Since: 2.80 */ -int +gssize gi_type_info_get_array_length_index (GITypeInfo *info) { GIRealInfo *rinfo = (GIRealInfo *)info; diff --git a/girepository/gitypeinfo.h b/girepository/gitypeinfo.h index 56a5c7c24..d12790a36 100644 --- a/girepository/gitypeinfo.h +++ b/girepository/gitypeinfo.h @@ -96,7 +96,7 @@ GI_AVAILABLE_IN_ALL GIBaseInfo * gi_type_info_get_interface (GITypeInfo *info); 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 gssize gi_type_info_get_array_fixed_size (GITypeInfo *info);