diff options
author | David Robillard <d@drobilla.net> | 2023-05-03 15:50:54 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-03 15:51:32 -0400 |
commit | 4196ab792e8f8957385fab68dd99c4cde19c870d (patch) | |
tree | c9115170911cc2084a863b9ccbdcdcdfc613fc5a /src | |
parent | 7941b8a670582678bd00113875d0a15756380581 (diff) | |
download | serd-4196ab792e8f8957385fab68dd99c4cde19c870d.tar.gz serd-4196ab792e8f8957385fab68dd99c4cde19c870d.tar.bz2 serd-4196ab792e8f8957385fab68dd99c4cde19c870d.zip |
Make serd_reader_read_chunk() work with NQuads
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 2 | ||||
-rw-r--r-- | src/reader.c | 4 | ||||
-rw-r--r-- | src/reader.h | 3 |
3 files changed, 7 insertions, 2 deletions
@@ -1723,7 +1723,7 @@ read_turtleTrigDoc(SerdReader* const reader) return SERD_SUCCESS; } -static SerdStatus +SerdStatus read_nquads_statement(SerdReader* const reader) { SerdStatus st = SERD_SUCCESS; diff --git a/src/reader.c b/src/reader.c index 32535ceb..5d87216d 100644 --- a/src/reader.c +++ b/src/reader.c @@ -357,7 +357,9 @@ serd_reader_read_chunk(SerdReader* const reader) st = skip_byte(reader, 0); } - return st ? st : read_n3_statement(reader); + return st ? st + : (reader->syntax == SERD_NQUADS) ? read_nquads_statement(reader) + : read_n3_statement(reader); } SerdStatus diff --git a/src/reader.h b/src/reader.h index 54914ee5..9b558d1f 100644 --- a/src/reader.h +++ b/src/reader.h @@ -101,6 +101,9 @@ SerdStatus read_n3_statement(SerdReader* reader); SerdStatus +read_nquads_statement(SerdReader* reader); + +SerdStatus read_nquadsDoc(SerdReader* reader); SerdStatus |