aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-09 21:39:31 -0400
committerDavid Robillard <d@drobilla.net>2022-01-13 23:04:26 -0500
commit4424a6f7781fcb9095618b2f2c846f3f99859b49 (patch)
tree0b26affd734bbfe08aed08968e6dc1d6735ec90d /include/serd
parent51f1de0235cfb091fcc481fa97d48326295d2c58 (diff)
downloadserd-4424a6f7781fcb9095618b2f2c846f3f99859b49.tar.gz
serd-4424a6f7781fcb9095618b2f2c846f3f99859b49.tar.bz2
serd-4424a6f7781fcb9095618b2f2c846f3f99859b49.zip
Replace serd_reader_set_strict() with SerdReaderFlags
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 8d00f4e5..47eca580 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1453,26 +1453,24 @@ serd_env_write_prefixes(const SerdEnv* SERD_NONNULL env,
/// Streaming parser that reads a text stream and writes to a statement sink
typedef struct SerdReaderImpl SerdReader;
+/// Reader options
+typedef enum {
+ SERD_READ_LAX = 1u << 0u ///< Tolerate invalid input where possible
+} SerdReaderFlag;
+
+/// Bitwise OR of SerdReaderFlag values
+typedef uint32_t SerdReaderFlags;
+
/// Create a new RDF reader
SERD_API
SerdReader* SERD_ALLOCATED
serd_reader_new(SerdWorld* SERD_NONNULL world,
SerdSyntax syntax,
+ SerdReaderFlags flags,
const SerdSink* SERD_NONNULL sink,
size_t stack_size);
/**
- Enable or disable strict parsing.
-
- The reader is non-strict (lax) by default, which will tolerate URIs with
- invalid characters. Setting strict will fail when parsing such files. An
- error is printed for invalid input in either case.
-*/
-SERD_API
-void
-serd_reader_set_strict(SerdReader* SERD_NONNULL reader, bool strict);
-
-/**
Set a prefix to be added to all blank node identifiers.
This is useful when multiple files are to be parsed into the same output (a