diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 13 | ||||
-rw-r--r-- | src/serd_config.h | 2 |
2 files changed, 10 insertions, 5 deletions
@@ -1672,12 +1672,17 @@ read_n3_statement(SerdReader* const reader) return st; } -static void -skip_until(SerdReader* const reader, const uint8_t byte) +SerdStatus +serd_reader_skip_until_byte(SerdReader* const reader, const uint8_t byte) { - for (int c = 0; (c = peek_byte(reader)) && c != byte && c != EOF;) { + int c = peek_byte(reader); + + while (c != byte && c != EOF) { skip_byte(reader, c); + c = peek_byte(reader); } + + return c == EOF ? SERD_FAILURE : SERD_SUCCESS; } SerdStatus @@ -1689,7 +1694,7 @@ read_turtleTrigDoc(SerdReader* const reader) if (reader->strict) { return st; } - skip_until(reader, '\n'); + serd_reader_skip_until_byte(reader, '\n'); } } diff --git a/src/serd_config.h b/src/serd_config.h index 98fb01c9..df73522b 100644 --- a/src/serd_config.h +++ b/src/serd_config.h @@ -16,7 +16,7 @@ #define SERD_CONFIG_H // Define version unconditionally so a warning will catch a mismatch -#define SERD_VERSION "0.30.17" +#define SERD_VERSION "0.31.0" #if !defined(SERD_NO_DEFAULT_CONFIG) |