From 6eb1fa15a06ab7de08e33add1540a45b83c5f0d8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 11 Jul 2021 20:47:51 -0400 Subject: Add SerdWorld for shared library state --- include/serd/writer.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'include/serd/writer.h') diff --git a/include/serd/writer.h b/include/serd/writer.h index 5f1d0535..77ecac80 100644 --- a/include/serd/writer.h +++ b/include/serd/writer.h @@ -6,12 +6,12 @@ #include "serd/attributes.h" #include "serd/env.h" -#include "serd/error.h" #include "serd/node.h" #include "serd/sink.h" #include "serd/status.h" #include "serd/stream.h" #include "serd/syntax.h" +#include "serd/world.h" #include @@ -47,7 +47,8 @@ typedef uint32_t SerdWriterFlags; /// Create a new RDF writer SERD_API SerdWriter* SERD_ALLOCATED -serd_writer_new(SerdSyntax syntax, +serd_writer_new(SerdWorld* SERD_NONNULL world, + SerdSyntax syntax, SerdWriterFlags flags, SerdEnv* SERD_NONNULL env, SerdWriteFunc SERD_NONNULL ssink, @@ -61,17 +62,6 @@ serd_writer_free(SerdWriter* SERD_NULLABLE writer); SERD_CONST_API const SerdSink* SERD_NONNULL serd_writer_sink(SerdWriter* SERD_NONNULL writer); -/** - Set a function to be called when errors occur during writing. - - The `error_func` will be called with `handle` as its first argument. If - no error function is set, errors are printed to stderr. -*/ -SERD_API void -serd_writer_set_error_sink(SerdWriter* SERD_NONNULL writer, - SerdErrorFunc SERD_NONNULL error_func, - void* SERD_NULLABLE error_handle); - /** Set a prefix to be removed from matching blank node identifiers. -- cgit v1.2.1