girepository: Fix int signedness in private GIBaseInfo APIs

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

Helps: #3155
This commit is contained in:
Philip Withnall 2023-12-12 18:13:59 +00:00
parent f3a02314c9
commit e4332bc78d
3 changed files with 6 additions and 8 deletions

View File

@ -51,15 +51,14 @@
GIFunctionInfo *
gi_base_info_find_method (GIBaseInfo *base,
guint32 offset,
gint n_methods,
guint n_methods,
const gchar *name)
{
/* FIXME hash */
GIRealInfo *rinfo = (GIRealInfo*)base;
Header *header = (Header *)rinfo->typelib->data;
gint i;
for (i = 0; i < n_methods; i++)
for (guint i = 0; i < n_methods; i++)
{
FunctionBlob *fblob = (FunctionBlob *)&rinfo->typelib->data[offset];
const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];

View File

@ -238,10 +238,10 @@ void gi_type_info_init (GIBaseInfo *info,
GIFunctionInfo * gi_base_info_find_method (GIBaseInfo *base,
guint32 offset,
gint n_methods,
guint n_methods,
const gchar *name);
GIVFuncInfo * gi_base_info_find_vfunc (GIRealInfo *rinfo,
guint32 offset,
gint n_vfuncs,
guint n_vfuncs,
const gchar *name);

View File

@ -48,14 +48,13 @@
GIVFuncInfo *
gi_base_info_find_vfunc (GIRealInfo *rinfo,
guint32 offset,
gint n_vfuncs,
guint n_vfuncs,
const gchar *name)
{
/* FIXME hash */
Header *header = (Header *)rinfo->typelib->data;
gint i;
for (i = 0; i < n_vfuncs; i++)
for (guint i = 0; i < n_vfuncs; i++)
{
VFuncBlob *fblob = (VFuncBlob *)&rinfo->typelib->data[offset];
const gchar *fname = (const gchar *)&rinfo->typelib->data[fblob->name];