diff options
author | David Robillard <d@drobilla.net> | 2018-05-10 19:29:22 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-19 20:52:29 -0500 |
commit | 9577022620cab6005c7f46348c617898f068e479 (patch) | |
tree | 6620b339e0a9d1f2c49f0ce8ada71f37e9e4ba7c /src/reader.h | |
parent | 18f7a9afa3155437e18fd2d99c6c065a1e7299b9 (diff) | |
download | serd-9577022620cab6005c7f46348c617898f068e479.tar.gz serd-9577022620cab6005c7f46348c617898f068e479.tar.bz2 serd-9577022620cab6005c7f46348c617898f068e479.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 45e3350d..405af546 100644 --- a/src/reader.h +++ b/src/reader.h @@ -52,31 +52,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 }; |