diff options
author | David Robillard <d@drobilla.net> | 2021-03-01 19:38:01 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | c2e59da8865a8c5719b8ddaf5f68204729a8ebab (patch) | |
tree | 4a8c2eb24c4a274eac41a226df6679a6319b6ac4 /src/reader.h | |
parent | b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9 (diff) | |
download | serd-c2e59da8865a8c5719b8ddaf5f68204729a8ebab.tar.gz serd-c2e59da8865a8c5719b8ddaf5f68204729a8ebab.tar.bz2 serd-c2e59da8865a8c5719b8ddaf5f68204729a8ebab.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 0de1df2a..db749fe8 100644 --- a/src/reader.h +++ b/src/reader.h @@ -45,27 +45,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 |