diff options
author | David Robillard <d@drobilla.net> | 2018-05-12 20:39:23 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 95f7334bbc02f3e75b33b9914eee58c69f1588bd (patch) | |
tree | bed06e929f286d099181d5e2e76ecf508df0add9 /serd | |
parent | 4f4408029cd8cefc1804d75a03f5c3f0ee7922fa (diff) | |
download | serd-95f7334bbc02f3e75b33b9914eee58c69f1588bd.tar.gz serd-95f7334bbc02f3e75b33b9914eee58c69f1588bd.tar.bz2 serd-95f7334bbc02f3e75b33b9914eee58c69f1588bd.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')
-rw-r--r-- | serd/serd.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/serd/serd.h b/serd/serd.h index bf1ac8d5..8aa97ed4 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -102,7 +102,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; /** @@ -903,7 +904,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. |