From 34852e8faa380f12b11522cfa998df4f260e3856 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Jul 2021 12:21:57 -0400 Subject: Avoid dynamic allocation of world blank node --- src/world.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/world.h') 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 @@ -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; }; -- cgit v1.2.1