[common] fix objectlist_push type

This commit is contained in:
Geoffrey McRae 2019-11-04 17:41:12 +11:00
parent 0851ae6f14
commit 6ed4e23b80
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
B1-21-gcaebddce4d+1
B1-22-g0851ae6f14+1

View File

@ -25,7 +25,7 @@ typedef void (*ObjectFreeFn)(void * object);
ObjectList objectlist_new (ObjectFreeFn free_fn);
void objectlist_free (ObjectList * sl);
int objectlist_push (ObjectList sl, char * str);
int objectlist_push (ObjectList sl, void * object);
unsigned int objectlist_count(ObjectList sl);
char * objectlist_at (ObjectList sl, unsigned int index);

View File

@ -52,7 +52,7 @@ void objectlist_free(ObjectList * ol)
*ol = NULL;
}
int objectlist_push (ObjectList ol, char * str)
int objectlist_push(ObjectList ol, void * object)
{
if (ol->count == ol->size)
{
@ -61,7 +61,7 @@ int objectlist_push (ObjectList ol, char * str)
}
unsigned int index = ol->count;
ol->list[ol->count++] = str;
ol->list[ol->count++] = object;
return index;
}