aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-03-01 13:24:02 -0500
committerDavid Robillard <d@drobilla.net>2022-01-13 15:33:54 -0500
commitda8e12fcbccf4558d4d524d7a6f659ea2ffc0ea2 (patch)
tree18ccddb7bc2ad526bcab4195220d23ac31a6f300 /include/serd
parent6cdd2b1e6f4ac37682ee20dca32441f88c92bcfa (diff)
downloadserd-da8e12fcbccf4558d4d524d7a6f659ea2ffc0ea2.tar.gz
serd-da8e12fcbccf4558d4d524d7a6f659ea2ffc0ea2.tar.bz2
serd-da8e12fcbccf4558d4d524d7a6f659ea2ffc0ea2.zip
Rename function types for consistency
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 74d3104a..7bccfc76 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -557,37 +557,37 @@ typedef struct {
} SerdError;
/**
- Sink (callback) for errors.
+ Callback function for errors.
@param handle Handle for user data.
@param error Error description.
*/
-typedef SerdStatus (*SerdErrorSink)(void* SERD_NULLABLE handle,
+typedef SerdStatus (*SerdErrorFunc)(void* SERD_NULLABLE handle,
const SerdError* SERD_NONNULL error);
/**
- Sink (callback) for base URI changes.
+ Sink function for base URI changes.
Called whenever the base URI of the serialisation changes.
*/
-typedef SerdStatus (*SerdBaseSink)(void* SERD_NULLABLE handle,
+typedef SerdStatus (*SerdBaseFunc)(void* SERD_NULLABLE handle,
const SerdNode* SERD_NONNULL uri);
/**
- Sink (callback) for namespace definitions.
+ Sink function for namespace definitions.
Called whenever a prefix is defined in the serialisation.
*/
-typedef SerdStatus (*SerdPrefixSink)(void* SERD_NULLABLE handle,
+typedef SerdStatus (*SerdPrefixFunc)(void* SERD_NULLABLE handle,
const SerdNode* SERD_NONNULL name,
const SerdNode* SERD_NONNULL uri);
/**
- Sink (callback) for statements.
+ Sink function for statements.
Called for every RDF statement in the serialisation.
*/
-typedef SerdStatus (*SerdStatementSink)(
+typedef SerdStatus (*SerdStatementFunc)(
void* SERD_NULLABLE handle,
SerdStatementFlags flags,
const SerdNode* SERD_NULLABLE graph,
@@ -598,13 +598,13 @@ typedef SerdStatus (*SerdStatementSink)(
const SerdNode* SERD_NULLABLE object_lang);
/**
- Sink (callback) for anonymous node end markers.
+ Sink function for anonymous node end markers.
- This is called to indicate that the anonymous node with the given
- `value` will no longer be referred to by any future statements
- (i.e. the anonymous serialisation of the node is finished).
+ This is called to indicate that the anonymous node with the given `value`
+ will no longer be referred to by any future statements (so the anonymous
+ node is finished).
*/
-typedef SerdStatus (*SerdEndSink)(void* SERD_NULLABLE handle,
+typedef SerdStatus (*SerdEndFunc)(void* SERD_NULLABLE handle,
const SerdNode* SERD_NONNULL node);
/**
@@ -693,7 +693,7 @@ serd_env_expand_node(const SerdEnv* SERD_NULLABLE env,
SERD_API
void
serd_env_foreach(const SerdEnv* SERD_NONNULL env,
- SerdPrefixSink SERD_NONNULL func,
+ SerdPrefixFunc SERD_NONNULL func,
void* SERD_NULLABLE handle);
/**
@@ -711,10 +711,10 @@ SerdReader* SERD_ALLOCATED
serd_reader_new(SerdSyntax syntax,
void* SERD_NULLABLE handle,
void (*SERD_NULLABLE free_handle)(void* SERD_NULLABLE),
- SerdBaseSink SERD_NULLABLE base_sink,
- SerdPrefixSink SERD_NULLABLE prefix_sink,
- SerdStatementSink SERD_NULLABLE statement_sink,
- SerdEndSink SERD_NULLABLE end_sink);
+ SerdBaseFunc SERD_NULLABLE base_func,
+ SerdPrefixFunc SERD_NULLABLE prefix_func,
+ SerdStatementFunc SERD_NULLABLE statement_func,
+ SerdEndFunc SERD_NULLABLE end_func);
/**
Enable or disable strict parsing.
@@ -730,13 +730,13 @@ serd_reader_set_strict(SerdReader* SERD_NONNULL reader, bool strict);
/**
Set a function to be called when errors occur during reading.
- The `error_sink` will be called with `handle` as its first argument. If
+ The `error_func` will be called with `handle` as its first argument. If
no error function is set, errors are printed to stderr in GCC style.
*/
SERD_API
void
serd_reader_set_error_sink(SerdReader* SERD_NONNULL reader,
- SerdErrorSink SERD_NULLABLE error_sink,
+ SerdErrorFunc SERD_NULLABLE error_func,
void* SERD_NULLABLE error_handle);
/// Return the `handle` passed to serd_reader_new()
@@ -937,13 +937,13 @@ serd_buffer_sink_finish(SerdBuffer* SERD_NONNULL stream);
/**
Set a function to be called when errors occur during writing.
- The `error_sink` will be called with `handle` as its first argument. If
+ 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,
- SerdErrorSink SERD_NONNULL error_sink,
+ SerdErrorFunc SERD_NONNULL error_func,
void* SERD_NULLABLE error_handle);
/**