diff options
author | rcombs <rcombs@rcombs.me> | 2022-12-15 19:18:45 -0600 |
---|---|---|
committer | rcombs <rcombs@rcombs.me> | 2023-01-28 14:20:20 -0600 |
commit | 3b2b47e32a1c143d7d6d2bd9b6d7752a3e71cdd3 (patch) | |
tree | 0a873f49ea1a6f8274628c3bbd784955c3adbf4d /misc/node.h | |
parent | fa7202d9f2f1afb207bfa5e39cec935896b72d6b (diff) | |
download | mpv-3b2b47e32a1c143d7d6d2bd9b6d7752a3e71cdd3.tar.bz2 mpv-3b2b47e32a1c143d7d6d2bd9b6d7752a3e71cdd3.tar.xz |
misc/node: add bstr-based variants for map_get() and map_add()
Diffstat (limited to 'misc/node.h')
-rw-r--r-- | misc/node.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/node.h b/misc/node.h index 419f3fc505..688b0a8ce9 100644 --- a/misc/node.h +++ b/misc/node.h @@ -2,15 +2,18 @@ #define MP_MISC_NODE_H_ #include "libmpv/client.h" +#include "misc/bstr.h" void node_init(struct mpv_node *dst, int format, struct mpv_node *parent); struct mpv_node *node_array_add(struct mpv_node *dst, int format); struct mpv_node *node_map_add(struct mpv_node *dst, const char *key, int format); +struct mpv_node *node_map_badd(struct mpv_node *dst, struct bstr key, int format); void node_map_add_string(struct mpv_node *dst, const char *key, const char *val); void node_map_add_int64(struct mpv_node *dst, const char *key, int64_t v); void node_map_add_double(struct mpv_node *dst, const char *key, double v); void node_map_add_flag(struct mpv_node *dst, const char *key, bool v); mpv_node *node_map_get(mpv_node *src, const char *key); +mpv_node *node_map_bget(mpv_node *src, struct bstr key); bool equal_mpv_value(const void *a, const void *b, mpv_format format); bool equal_mpv_node(const struct mpv_node *a, const struct mpv_node *b); |