diff options
author | David Robillard <d@drobilla.net> | 2014-12-10 20:55:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-10 20:55:14 +0000 |
commit | d51be9b8d97791bff796d046d10fe16fd4e41311 (patch) | |
tree | 2b6ab1c33692332df65b060295b83e09b7587dd2 /serd | |
parent | cb580bb689733d8db0921f2a3a2232133b9d26b5 (diff) | |
download | serd-d51be9b8d97791bff796d046d10fe16fd4e41311.tar.gz serd-d51be9b8d97791bff796d046d10fe16fd4e41311.tar.bz2 serd-d51be9b8d97791bff796d046d10fe16fd4e41311.zip |
Configurable strict parsing to tolerate invalid URIs.
git-svn-id: http://svn.drobilla.net/serd/trunk@480 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index 9f9257ec..acc1ee4f 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -689,6 +689,17 @@ serd_reader_new(SerdSyntax syntax, SerdEndSink end_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* reader, bool strict); + +/** Set a function to be called when errors occur during reading. The `error_sink` will be called with `handle` as its first argument. If |