mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-22 01:40:33 -05:00
spa: add spa_json_begin
That combines spa_json_init() and spa_json_next, a common thing to do.
This commit is contained in:
parent
08057e0328
commit
feccb882b6
7 changed files with 15 additions and 18 deletions
|
|
@ -356,6 +356,12 @@ static inline bool spa_json_get_error(struct spa_json *iter, const char *start,
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline int spa_json_begin(struct spa_json * iter, const char *data, size_t size, const char **val)
|
||||
{
|
||||
spa_json_init(iter, data, size);
|
||||
return spa_json_next(iter, val);
|
||||
}
|
||||
|
||||
static inline int spa_json_enter_container(struct spa_json *iter, struct spa_json *sub, char type)
|
||||
{
|
||||
const char *value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue