diff options
author | David Robillard <d@drobilla.net> | 2018-10-21 20:57:33 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:04:05 -0500 |
commit | 89be71eabefcc55a3d0a56d7bed7124c4fdafbd8 (patch) | |
tree | 6c2b019b462999d1178441943d1cf90c4bd7b17c /src/stack.h | |
parent | aca4640882aab7da0193ee2f5767ecd6d9506b0c (diff) | |
download | serd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.tar.gz serd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.tar.bz2 serd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.zip |
Simplify streaming API and improve pretty printing
This removes the obligation from the caller to correctly maintain flags to
describe the current anonymous context, instead making the writer handle this
itself as much as possible. Flags remain for the cases the writer can not
infer from context: the start of anonymous subject and object nodes.
Diffstat (limited to 'src/stack.h')
-rw-r--r-- | src/stack.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stack.h b/src/stack.h index 49f77843..074d43b0 100644 --- a/src/stack.h +++ b/src/stack.h @@ -46,6 +46,12 @@ serd_stack_new(size_t size) return stack; } +static inline void +serd_stack_clear(SerdStack* stack) +{ + stack->size = SERD_STACK_BOTTOM; +} + static inline bool serd_stack_is_empty(const SerdStack* stack) { |