gitypeinfo: Fix int signedness in APIs

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

Helps: #3155
This commit is contained in:
Philip Withnall 2023-12-12 18:22:38 +00:00
parent e138287769
commit 23d9a79c62
3 changed files with 7 additions and 6 deletions

View File

@ -244,7 +244,8 @@ write_type_info (const gchar *ns,
}
else if (tag == GI_TYPE_TAG_ARRAY)
{
gint length, size;
gint length;
gssize size;
const char *name = NULL;
xml_start_element (file, "array");
@ -276,7 +277,7 @@ write_type_info (const gchar *ns,
size = gi_type_info_get_array_fixed_size (info);
if (size >= 0)
xml_printf (file, " fixed-size=\"%d\"", size);
xml_printf (file, " fixed-size=\"%" G_GSSIZE_FORMAT "\"", size);
if (gi_type_info_is_zero_terminated (info))
xml_printf (file, " zero-terminated=\"1\"");

View File

@ -135,7 +135,7 @@ gi_type_info_get_tag (GITypeInfo *info)
*/
GITypeInfo *
gi_type_info_get_param_type (GITypeInfo *info,
gint n)
guint n)
{
GIRealInfo *rinfo = (GIRealInfo *)info;
SimpleTypeBlob *type;
@ -270,7 +270,7 @@ gi_type_info_get_array_length (GITypeInfo *info)
* Returns: the size or `-1` if the type is not an array
* Since: 2.80
*/
gint
gssize
gi_type_info_get_array_fixed_size (GITypeInfo *info)
{
GIRealInfo *rinfo = (GIRealInfo *)info;

View File

@ -90,7 +90,7 @@ GITypeTag gi_type_info_get_tag (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
GITypeInfo * gi_type_info_get_param_type (GITypeInfo *info,
gint n);
guint n);
GI_AVAILABLE_IN_ALL
GIBaseInfo * gi_type_info_get_interface (GITypeInfo *info);
@ -99,7 +99,7 @@ GI_AVAILABLE_IN_ALL
gint gi_type_info_get_array_length (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
gint gi_type_info_get_array_fixed_size(GITypeInfo *info);
gssize gi_type_info_get_array_fixed_size (GITypeInfo *info);
GI_AVAILABLE_IN_ALL
gboolean gi_type_info_is_zero_terminated (GITypeInfo *info);