aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/writer.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-15 09:26:17 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitb631e7a3d6a807aaf4919396b62ba96e1a9f0bd9 (patch)
tree70a49bcc4d79d83d0f80f115da457514e09977d0 /include/serd/writer.h
parentfe0b6d5d4d78cb31e1bf2381198890d070e46ed1 (diff)
downloadserd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.tar.gz
serd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.tar.bz2
serd-b631e7a3d6a807aaf4919396b62ba96e1a9f0bd9.zip
Bring read/write interface closer to the C standard
Diffstat (limited to 'include/serd/writer.h')
-rw-r--r--include/serd/writer.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/include/serd/writer.h b/include/serd/writer.h
index 976ed5b7..94747309 100644
--- a/include/serd/writer.h
+++ b/include/serd/writer.h
@@ -13,7 +13,6 @@
#include "serd/stream.h"
#include "serd/syntax.h"
-#include <stddef.h>
#include <stdint.h>
SERD_BEGIN_DECLS
@@ -48,11 +47,11 @@ typedef uint32_t SerdWriterFlags;
/// Create a new RDF writer
SERD_API SerdWriter* SERD_ALLOCATED
-serd_writer_new(SerdSyntax syntax,
- SerdWriterFlags flags,
- SerdEnv* SERD_NONNULL env,
- SerdSink SERD_NONNULL ssink,
- void* SERD_NULLABLE stream);
+serd_writer_new(SerdSyntax syntax,
+ SerdWriterFlags flags,
+ SerdEnv* SERD_NONNULL env,
+ SerdWriteFunc SERD_NONNULL ssink,
+ void* SERD_NULLABLE stream);
/// Free `writer`
SERD_API void
@@ -63,17 +62,6 @@ SERD_PURE_API SerdEnv* SERD_NONNULL
serd_writer_env(SerdWriter* SERD_NONNULL writer);
/**
- A convenience sink function for writing to a FILE*.
-
- This function can be used as a #SerdSink when writing to a FILE*. The
- `stream` parameter must be a FILE* opened for writing.
-*/
-SERD_API size_t
-serd_file_sink(const void* SERD_NONNULL buf,
- size_t len,
- void* SERD_NONNULL stream);
-
-/**
Set a function to be called when errors occur during writing.
The `error_func` will be called with `handle` as its first argument. If