mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
properties: Expose _update_string() method
Refactor an internal method and expose as _update_string() to update an existing properties structure with a string representation.
This commit is contained in:
parent
5f561334fb
commit
923e82df27
3 changed files with 56 additions and 53 deletions
|
|
@ -317,7 +317,7 @@ static void test_new_json(void)
|
|||
props = pw_properties_new_string("{ \"foo\": \"bar\\n\\t\", \"bar\": 1.8, \"empty\": [ \"foo\", \"bar\" ], \"\": \"gg\"");
|
||||
spa_assert(props != NULL);
|
||||
spa_assert(props->flags == 0);
|
||||
spa_assert(props->dict.n_items == 4);
|
||||
spa_assert(props->dict.n_items == 3);
|
||||
|
||||
spa_assert(!strcmp(pw_properties_get(props, "foo"), "bar\n\t"));
|
||||
spa_assert(!strcmp(pw_properties_get(props, "bar"), "1.8"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue