aboutsummaryrefslogtreecommitdiffstats
path: root/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-12 20:39:23 +0200
committerDavid Robillard <d@drobilla.net>2020-06-21 18:12:04 +0200
commitaa0ec96ea8a25a2c12527acb4656bfa0af5b8409 (patch)
tree09b7f61a13fdfe20a285f1012c3adf63be60b06b /serd/serd.h
parentbc0e185a469018ea70f32abb50c4b4a1073b0249 (diff)
downloadserd-aa0ec96ea8a25a2c12527acb4656bfa0af5b8409.tar.gz
serd-aa0ec96ea8a25a2c12527acb4656bfa0af5b8409.tar.bz2
serd-aa0ec96ea8a25a2c12527acb4656bfa0af5b8409.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 'serd/serd.h')
-rw-r--r--serd/serd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/serd/serd.h b/serd/serd.h
index ac57a8b5..87a91aec 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -98,7 +98,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;
/**
@@ -899,7 +900,10 @@ serd_env_foreach(const SerdEnv* env,
*/
SERD_API
SerdReader*
-serd_reader_new(SerdWorld* world, SerdSyntax syntax, const SerdSink* sink);
+serd_reader_new(SerdWorld* world,
+ SerdSyntax syntax,
+ const SerdSink* sink,
+ size_t stack_size);
/**
Enable or disable strict parsing.