From 31ef2936a1549cdc125c387a8f541d8b70e60c21 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Jul 2021 21:39:31 -0400 Subject: Replace serd_reader_set_strict() with SerdReaderFlags --- include/serd/reader.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/serd/reader.h b/include/serd/reader.h index a2b2698d..5df1acc9 100644 --- a/include/serd/reader.h +++ b/include/serd/reader.h @@ -27,22 +27,21 @@ SERD_BEGIN_DECLS /// 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); -/** - 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. -- cgit v1.2.1