aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.h')
-rw-r--r--src/reader.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/reader.h b/src/reader.h
index 17c0c49d..73647307 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -41,11 +41,10 @@ struct SerdReaderImpl {
SerdNode* rdf_first;
SerdNode* rdf_rest;
SerdNode* rdf_nil;
- SerdByteSource source;
+ SerdByteSource* source;
SerdStack stack;
SerdSyntax syntax;
unsigned next_id;
- uint8_t* buf;
char* bprefix;
size_t bprefix_len;
bool strict; ///< True iff strict parsing
@@ -93,7 +92,7 @@ emit_statement(SerdReader* reader, ReadContext ctx, SerdNode* o);
static inline int
peek_byte(SerdReader* reader)
{
- SerdByteSource* source = &reader->source;
+ SerdByteSource* source = reader->source;
return source->eof ? EOF : (int)source->read_buf[source->read_head];
}
@@ -105,7 +104,7 @@ skip_byte(SerdReader* reader, const int byte)
assert(peek_byte(reader) == byte);
- return serd_byte_source_advance(&reader->source);
+ return serd_byte_source_advance(reader->source);
}
static inline int
@@ -114,7 +113,7 @@ eat_byte(SerdReader* const reader)
const int c = peek_byte(reader);
if (c != EOF) {
- serd_byte_source_advance(&reader->source);
+ serd_byte_source_advance(reader->source);
}
return c;
@@ -127,7 +126,7 @@ eat_byte_safe(SerdReader* reader, const int byte)
assert(peek_byte(reader) == byte);
- serd_byte_source_advance(&reader->source);
+ serd_byte_source_advance(reader->source);
return byte;
}