mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
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:
parent
f613240b66
commit
d9a51b5d14
10 changed files with 41 additions and 25 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue