aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-13 19:34:11 +0100
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit2e25fe1e64f487fd91ff6f636bf3249b761ffcdc (patch)
tree73dc6d1731442acd26ea5b1f11de000c8dd31967 /include
parente6abc21f9bde66d8f60078493354ba3713f9fcd8 (diff)
downloadserd-2e25fe1e64f487fd91ff6f636bf3249b761ffcdc.tar.gz
serd-2e25fe1e64f487fd91ff6f636bf3249b761ffcdc.tar.bz2
serd-2e25fe1e64f487fd91ff6f636bf3249b761ffcdc.zip
Use a fixed-size reader stack
This improves performance, and makes the reader more suitable for embedded or network-facing applications, at the cost of requiring the user to specify a maximum stack size.
Diffstat (limited to 'include')
-rw-r--r--include/serd/serd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index d51adebe..63d094ef 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -96,7 +96,8 @@ typedef enum {
SERD_ERR_NOT_FOUND, ///< Not found
SERD_ERR_ID_CLASH, ///< Encountered clashing blank node IDs
SERD_ERR_BAD_CURIE, ///< Invalid CURIE (e.g. prefix does not exist)
- SERD_ERR_INTERNAL ///< Unexpected internal error (should not happen)
+ SERD_ERR_INTERNAL, ///< Unexpected internal error (should not happen)
+ SERD_ERR_OVERFLOW ///< Stack overflow
} SerdStatus;
/// RDF syntax type
@@ -903,7 +904,9 @@ serd_sink_write_end(const SerdSink* SERD_NONNULL sink,
/// Create a new RDF reader
SERD_API
SerdReader* SERD_ALLOCATED
-serd_reader_new(SerdSyntax syntax, const SerdSink* SERD_NONNULL sink);
+serd_reader_new(SerdSyntax syntax,
+ const SerdSink* SERD_NONNULL sink,
+ size_t stack_size);
/**
Enable or disable strict parsing