mapper: place strings in array

mapper: place strings in a big array.
Make it possible to configure array and map extend size.
This commit is contained in:
Wim Taymans 2017-03-23 17:57:03 +01:00
parent f613240b66
commit d9a51b5d14
10 changed files with 41 additions and 25 deletions

View file

@ -81,7 +81,7 @@ pinos_properties_new (const char *key, ...)
if (impl == NULL)
return NULL;
pinos_array_init (&impl->items);
pinos_array_init (&impl->items, 16);
va_start (varargs, key);
while (key != NULL) {
@ -112,7 +112,7 @@ pinos_properties_new_dict (const SpaDict *dict)
if (impl == NULL)
return NULL;
pinos_array_init (&impl->items);
pinos_array_init (&impl->items, 16);
for (i = 0; i < dict->n_items; i++)
add_func (&impl->this, strdup (dict->items[i].key), strdup (dict->items[i].value));