diff options
author | David Robillard <d@drobilla.net> | 2018-05-10 19:29:22 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 15:58:15 +0100 |
commit | f2a19949d0da60465e2d68b5e66a52e0d970ebd1 (patch) | |
tree | 0e72fcb7205e52f82e3821b2da9e5335716a5115 /src/reader.h | |
parent | 6cf2ecfab4b3cb150b154bdc1130aca022a8f89c (diff) | |
download | serd-f2a19949d0da60465e2d68b5e66a52e0d970ebd1.tar.gz serd-f2a19949d0da60465e2d68b5e66a52e0d970ebd1.tar.bz2 serd-f2a19949d0da60465e2d68b5e66a52e0d970ebd1.zip |
Add SerdSink interface and hide individual function implementations
Diffstat (limited to 'src/reader.h')
-rw-r--r-- | src/reader.h | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/reader.h b/src/reader.h index 842ba8b8..668c4b40 100644 --- a/src/reader.h +++ b/src/reader.h @@ -46,31 +46,26 @@ typedef struct { } ReadContext; struct SerdReaderImpl { - void* handle; - void (*free_handle)(void* ptr); - SerdBaseSink base_sink; - SerdPrefixSink prefix_sink; - SerdStatementSink statement_sink; - SerdEndSink end_sink; - SerdErrorSink error_sink; - void* error_handle; - Ref rdf_first; - Ref rdf_rest; - Ref rdf_nil; - SerdNode* default_graph; - SerdByteSource source; - SerdStack stack; - SerdSyntax syntax; - unsigned next_id; - SerdStatus status; - uint8_t* buf; - char* bprefix; - size_t bprefix_len; - bool strict; ///< True iff strict parsing - bool seen_genid; + const SerdSink* sink; + SerdErrorSink error_sink; + void* error_handle; + Ref rdf_first; + Ref rdf_rest; + Ref rdf_nil; + SerdNode* default_graph; + SerdByteSource source; + SerdStack stack; + SerdSyntax syntax; + unsigned next_id; + SerdStatus status; + 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 + Ref* allocs; ///< Stack of push offsets + size_t n_allocs; ///< Number of stack pushes #endif }; |