aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-02-24 09:02:00 +0100
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit3ff6565bdf0861f9db3527b58919ca7481deca6c (patch)
tree7eff683d57ed01e59a50400eae02e7c760e9357e
parenta08759985ce25cda9b340a85eef30f572a8ceacc (diff)
downloadserd-3ff6565bdf0861f9db3527b58919ca7481deca6c.tar.gz
serd-3ff6565bdf0861f9db3527b58919ca7481deca6c.tar.bz2
serd-3ff6565bdf0861f9db3527b58919ca7481deca6c.zip
Use consistent naming for function types
-rw-r--r--serd/serd.h22
-rw-r--r--src/sink.c8
-rw-r--r--src/sink.h8
-rw-r--r--src/writer.c8
4 files changed, 23 insertions, 23 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 7197f2c8..e471988c 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -762,34 +762,34 @@ serd_node_compare(const SerdNode* a, const SerdNode* b);
Called whenever the base URI of the serialisation changes.
*/
-typedef SerdStatus (*SerdBaseSink)(void* handle, const SerdNode* uri);
+typedef SerdStatus (*SerdBaseFunc)(void* handle, const SerdNode* uri);
/**
- Sink (callback) for namespace definitions
+ Sink function for namespace definitions
Called whenever a prefix is defined in the serialisation.
*/
-typedef SerdStatus (*SerdPrefixSink)(void* handle,
+typedef SerdStatus (*SerdPrefixFunc)(void* handle,
const SerdNode* name,
const SerdNode* uri);
/**
- Sink (callback) for statements
+ Sink function for statements
Called for every RDF statement in the serialisation.
*/
-typedef SerdStatus (*SerdStatementSink)(void* handle,
+typedef SerdStatus (*SerdStatementFunc)(void* handle,
SerdStatementFlags flags,
const SerdStatement* statement);
/**
- 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).
*/
-typedef SerdStatus (*SerdEndSink)(void* handle, const SerdNode* node);
+typedef SerdStatus (*SerdEndFunc)(void* handle, const SerdNode* node);
/**
@}
@@ -1034,22 +1034,22 @@ serd_sink_free(SerdSink* sink);
/// Set a function to be called when the base URI changes
SERD_API
SerdStatus
-serd_sink_set_base_func(SerdSink* sink, SerdBaseSink base_func);
+serd_sink_set_base_func(SerdSink* sink, SerdBaseFunc base_func);
/// Set a function to be called when a namespace prefix is defined
SERD_API
SerdStatus
-serd_sink_set_prefix_func(SerdSink* sink, SerdPrefixSink prefix_func);
+serd_sink_set_prefix_func(SerdSink* sink, SerdPrefixFunc prefix_func);
/// Set a function to be called when a statement is emitted
SERD_API
SerdStatus
-serd_sink_set_statement_func(SerdSink* sink, SerdStatementSink statement_func);
+serd_sink_set_statement_func(SerdSink* sink, SerdStatementFunc statement_func);
/// Set a function to be called when an anonymous node ends
SERD_API
SerdStatus
-serd_sink_set_end_func(SerdSink* sink, SerdEndSink end_func);
+serd_sink_set_end_func(SerdSink* sink, SerdEndFunc end_func);
/// Set the base URI
SERD_API
diff --git a/src/sink.c b/src/sink.c
index c8a0dd62..edaf271f 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -38,28 +38,28 @@ serd_sink_free(SerdSink* sink)
}
SerdStatus
-serd_sink_set_base_func(SerdSink* sink, SerdBaseSink base_func)
+serd_sink_set_base_func(SerdSink* sink, SerdBaseFunc base_func)
{
sink->base = base_func;
return SERD_SUCCESS;
}
SerdStatus
-serd_sink_set_prefix_func(SerdSink* sink, SerdPrefixSink prefix_func)
+serd_sink_set_prefix_func(SerdSink* sink, SerdPrefixFunc prefix_func)
{
sink->prefix = prefix_func;
return SERD_SUCCESS;
}
SerdStatus
-serd_sink_set_statement_func(SerdSink* sink, SerdStatementSink statement_func)
+serd_sink_set_statement_func(SerdSink* sink, SerdStatementFunc statement_func)
{
sink->statement = statement_func;
return SERD_SUCCESS;
}
SerdStatus
-serd_sink_set_end_func(SerdSink* sink, SerdEndSink end_func)
+serd_sink_set_end_func(SerdSink* sink, SerdEndFunc end_func)
{
sink->end = end_func;
return SERD_SUCCESS;
diff --git a/src/sink.h b/src/sink.h
index 25dfb079..57c52021 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -24,10 +24,10 @@
*/
struct SerdSinkImpl {
void* handle;
- SerdBaseSink base;
- SerdPrefixSink prefix;
- SerdStatementSink statement;
- SerdEndSink end;
+ SerdBaseFunc base;
+ SerdPrefixFunc prefix;
+ SerdStatementFunc statement;
+ SerdEndFunc end;
};
#endif // SERD_SINK_H
diff --git a/src/writer.c b/src/writer.c
index 891f2413..6b7e39b5 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -954,10 +954,10 @@ serd_writer_new(SerdWorld* world,
writer->empty = true;
writer->iface.handle = writer;
- writer->iface.base = (SerdBaseSink)serd_writer_set_base_uri;
- writer->iface.prefix = (SerdPrefixSink)serd_writer_set_prefix;
- writer->iface.statement = (SerdStatementSink)serd_writer_write_statement;
- writer->iface.end = (SerdEndSink)serd_writer_end_anon;
+ writer->iface.base = (SerdBaseFunc)serd_writer_set_base_uri;
+ writer->iface.prefix = (SerdPrefixFunc)serd_writer_set_prefix;
+ writer->iface.statement = (SerdStatementFunc)serd_writer_write_statement;
+ writer->iface.end = (SerdEndFunc)serd_writer_end_anon;
return writer;
}