mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[common] fix objectlist_push type
This commit is contained in:
parent
0851ae6f14
commit
6ed4e23b80
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user