aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-10-28 14:15:28 +0100
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commitc8594c69b612005c7507ad00f7274ca7791197d7 (patch)
tree74a33b550deb1a953a6a9d53872c626878194206 /include/serd
parente750f4b6734d086e433e3c9c05b2252f43f4be8f (diff)
downloadserd-c8594c69b612005c7507ad00f7274ca7791197d7.tar.gz
serd-c8594c69b612005c7507ad00f7274ca7791197d7.tar.bz2
serd-c8594c69b612005c7507ad00f7274ca7791197d7.zip
Cache commonly used nodes in the world
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/world.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/serd/world.h b/include/serd/world.h
index dc2b3b83..fb0930aa 100644
--- a/include/serd/world.h
+++ b/include/serd/world.h
@@ -7,6 +7,7 @@
#include "serd/attributes.h"
#include "serd/memory.h"
#include "serd/node.h"
+#include "serd/nodes.h"
#include "serd/status.h"
#include "zix/attributes.h"
@@ -68,6 +69,16 @@ SERD_API SerdStatus
serd_world_set_limits(SerdWorld* ZIX_NONNULL world, SerdLimits limits);
/**
+ Return the nodes cache in `world`.
+
+ The returned cache is owned by the world and contains various nodes used
+ frequently by the implementation. For convenience, it may be used to store
+ additional nodes which will be freed when the world is freed.
+*/
+SERD_PURE_API SerdNodes* ZIX_NONNULL
+serd_world_nodes(SerdWorld* ZIX_NONNULL world);
+
+/**
Return a unique blank node.
The returned node is valid only until the next time serd_world_get_blank()