diff options
author | David Robillard <d@drobilla.net> | 2018-12-29 17:36:15 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-31 11:37:49 -0500 |
commit | 904d3d9b0bcdbb1507adccdde831db0d5f7ae251 (patch) | |
tree | be485f9684819534972a40ced925138f5e4d850c /tests | |
parent | beb2eba61195d6ef838cd3bfd363ae74785aaff9 (diff) | |
download | serd-904d3d9b0bcdbb1507adccdde831db0d5f7ae251.tar.gz serd-904d3d9b0bcdbb1507adccdde831db0d5f7ae251.tar.bz2 serd-904d3d9b0bcdbb1507adccdde831db0d5f7ae251.zip |
Add Env to Sink
This isn't technically necessary for any sink, but is a pattern common to every
sink implementation in serd, so having it here reduces boilerplate and
parameters in user code.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/overflow_test.c | 2 | ||||
-rw-r--r-- | tests/read_chunk_test.c | 2 | ||||
-rw-r--r-- | tests/serd_test.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/overflow_test.c b/tests/overflow_test.c index d3a1816e..5c2c4ef1 100644 --- a/tests/overflow_test.c +++ b/tests/overflow_test.c @@ -59,7 +59,7 @@ main(void) {NULL, 0}}; SerdWorld* world = serd_world_new(); - SerdSink* sink = serd_sink_new(NULL); + SerdSink* sink = serd_sink_new(NULL, NULL); for (const Test* t = tests; t->str; ++t) { const SerdStatus st = test(world, sink, t->str, t->stack_size); diff --git a/tests/read_chunk_test.c b/tests/read_chunk_test.c index f02fbe92..264bb0e8 100644 --- a/tests/read_chunk_test.c +++ b/tests/read_chunk_test.c @@ -73,7 +73,7 @@ int main(void) { SerdWorld* world = serd_world_new(); - SerdSink* sink = serd_sink_new(NULL); + SerdSink* sink = serd_sink_new(NULL, NULL); serd_sink_set_base_func(sink, on_base); serd_sink_set_prefix_func(sink, on_prefix); serd_sink_set_statement_func(sink, on_statement); diff --git a/tests/serd_test.c b/tests/serd_test.c index 640d81dc..86911b0c 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -451,7 +451,7 @@ main(void) assert(serd_env_set_prefix(env, b, lit)); size_t n_prefixes = 0; - SerdSink* count_prefixes_sink = serd_sink_new(&n_prefixes); + SerdSink* count_prefixes_sink = serd_sink_new(&n_prefixes, NULL); serd_sink_set_prefix_func(count_prefixes_sink, count_prefixes); serd_env_set_prefix(env, pre, eg); serd_env_send_prefixes(env, count_prefixes_sink); @@ -600,7 +600,7 @@ main(void) fseek(fd, 0, SEEK_SET); size_t n_statements = 0; - SerdSink* sink = serd_sink_new(&n_statements); + SerdSink* sink = serd_sink_new(&n_statements, NULL); serd_sink_set_statement_func(sink, count_statements); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); |