girepository: Use size_t to keep track of the number of interfaces

This commit is contained in:
Marco Trevisan (Treviño) 2024-01-16 02:11:41 +01:00
parent bd29b0bf65
commit a73cc6d5a2

View File

@ -69,7 +69,7 @@ static GIRepository *default_repository = NULL;
static GPtrArray *typelib_search_path = NULL;
typedef struct {
unsigned int n_interfaces;
size_t n_interfaces;
GIBaseInfo *interfaces[];
} GTypeInterfaceCache;
@ -78,7 +78,7 @@ gtype_interface_cache_free (gpointer data)
{
GTypeInterfaceCache *cache = data;
for (unsigned int i = 0; i < cache->n_interfaces; i++)
for (size_t i = 0; i < cache->n_interfaces; i++)
gi_base_info_unref ((GIBaseInfo*) cache->interfaces[i]);
g_free (cache);
}