diff options
author | David Robillard <d@drobilla.net> | 2018-02-04 18:35:41 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-30 17:56:22 -0500 |
commit | 873b05eaedf2c3978cd98268afa6f982a25bc80b (patch) | |
tree | fb01e1008b24d89123278cb2b254bd9bab23218e /src/serd_internal.h | |
parent | a67d0b0fc4fcb924c1c04e909ff3a0880737a787 (diff) | |
download | serd-873b05eaedf2c3978cd98268afa6f982a25bc80b.tar.gz serd-873b05eaedf2c3978cd98268afa6f982a25bc80b.tar.bz2 serd-873b05eaedf2c3978cd98268afa6f982a25bc80b.zip |
Make nodes opaque
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r-- | src/serd_internal.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h index bd6db527..3f138a21 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -44,6 +44,16 @@ static const uint8_t replacement_char[] = { 0xEF, 0xBF, 0xBD }; +struct SerdNodeImpl { + size_t n_bytes; /**< Size in bytes (not including null) */ + SerdNodeFlags flags; /**< Node flags (e.g. string properties) */ + SerdType type; /**< Node type */ +}; + +static const SerdNode SERD_NODE_NULL = { 0, 0, SERD_NOTHING }; + +SerdNode* serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdType type); +void serd_node_set(SerdNode** dst, const SerdNode* src); char* serd_node_buffer(SerdNode* node); /* File and Buffer Utilities */ @@ -571,7 +581,7 @@ struct SerdReaderImpl { Ref rdf_first; Ref rdf_rest; Ref rdf_nil; - SerdNode default_graph; + SerdNode* default_graph; SerdByteSource source; SerdStack stack; SerdSyntax syntax; |