diff options
author | David Robillard <d@drobilla.net> | 2021-07-23 12:21:57 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-14 19:37:51 -0500 |
commit | 34852e8faa380f12b11522cfa998df4f260e3856 (patch) | |
tree | 4aff80f3b67eb29ea827f7eb02bb027d3c9fb323 /src/world.h | |
parent | 1f783d27991dabb3b8312db8970cd1778a6ae3e6 (diff) | |
download | serd-34852e8faa380f12b11522cfa998df4f260e3856.tar.gz serd-34852e8faa380f12b11522cfa998df4f260e3856.tar.bz2 serd-34852e8faa380f12b11522cfa998df4f260e3856.zip |
Avoid dynamic allocation of world blank node
Diffstat (limited to 'src/world.h')
-rw-r--r-- | src/world.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/world.h b/src/world.h index 8043663e..8cc99e61 100644 --- a/src/world.h +++ b/src/world.h @@ -17,6 +17,7 @@ #ifndef SERD_WORLD_H #define SERD_WORLD_H +#include "node.h" #include "serd/serd.h" #include <stdbool.h> @@ -26,7 +27,6 @@ struct SerdWorldImpl { SerdNodes* nodes; SerdLogFunc log_func; void* log_handle; - SerdNode* blank_node; const SerdNode* rdf_first; const SerdNode* rdf_nil; const SerdNode* rdf_rest; @@ -34,7 +34,13 @@ struct SerdWorldImpl { const SerdNode* xsd_boolean; const SerdNode* xsd_decimal; const SerdNode* xsd_integer; - uint32_t next_blank_id; + + struct { + SerdNode node; + char string[16]; + } blank; + + uint32_t next_blank_id; bool stderr_color; }; |