diff options
author | David Robillard <d@drobilla.net> | 2021-03-01 19:38:01 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-07 15:32:24 -0500 |
commit | b085fe7aa38e5e2caf82b1fec6b7e6094779dd5a (patch) | |
tree | d6058aef1c4323ad7039e8e16076cc52f1e7514e /src/reader.h | |
parent | 58890c798fbd87a2080c2fa8cc206a2631c3e558 (diff) | |
download | serd-b085fe7aa38e5e2caf82b1fec6b7e6094779dd5a.tar.gz serd-b085fe7aa38e5e2caf82b1fec6b7e6094779dd5a.tar.bz2 serd-b085fe7aa38e5e2caf82b1fec6b7e6094779dd5a.zip |
Add SerdSink interface and hide implementations
Diffstat (limited to 'src/reader.h')
-rw-r--r-- | src/reader.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/reader.h b/src/reader.h index 8df16da3..c34f3a8b 100644 --- a/src/reader.h +++ b/src/reader.h @@ -57,27 +57,22 @@ typedef struct { } ReadContext; struct SerdReaderImpl { - void* handle; - void (*free_handle)(void* ptr); - SerdBaseFunc base_func; - SerdPrefixFunc prefix_func; - SerdStatementFunc statement_func; - SerdEndFunc end_func; - SerdErrorFunc error_func; - void* error_handle; - Ref rdf_first; - Ref rdf_rest; - Ref rdf_nil; - SerdNode* default_graph; - SerdByteSource source; - SerdStack stack; - SerdSyntax syntax; - unsigned next_id; - uint8_t* buf; - char* bprefix; - size_t bprefix_len; - bool strict; ///< True iff strict parsing - bool seen_genid; + const SerdSink* sink; + SerdErrorFunc error_func; + void* error_handle; + Ref rdf_first; + Ref rdf_rest; + Ref rdf_nil; + SerdNode* default_graph; + SerdByteSource source; + SerdStack stack; + SerdSyntax syntax; + unsigned next_id; + uint8_t* buf; + char* bprefix; + size_t bprefix_len; + bool strict; ///< True iff strict parsing + bool seen_genid; #ifdef SERD_STACK_CHECK Ref* allocs; ///< Stack of push offsets size_t n_allocs; ///< Number of stack pushes |