aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-30 12:35:47 -0500
committerDavid Robillard <d@drobilla.net>2018-12-31 11:37:49 -0500
commitb3c0633ba1421d6753b6b2c9dbcd46e51e6e55b3 (patch)
tree4f1027d88cceda4bf4972a6535fc8e5357e3b046 /tests
parentb1c007c9989d0b769a040b98d4dc50ec456a5d4b (diff)
downloadserd-b3c0633ba1421d6753b6b2c9dbcd46e51e6e55b3.tar.gz
serd-b3c0633ba1421d6753b6b2c9dbcd46e51e6e55b3.tar.bz2
serd-b3c0633ba1421d6753b6b2c9dbcd46e51e6e55b3.zip
Remove serd_env_foreach()
Diffstat (limited to 'tests')
-rw-r--r--tests/serd_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 02df79d3..640d81dc 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -450,9 +450,11 @@ main(void)
SerdNode* lit = serd_new_string("hello");
assert(serd_env_set_prefix(env, b, lit));
- int n_prefixes = 0;
+ size_t n_prefixes = 0;
+ SerdSink* count_prefixes_sink = serd_sink_new(&n_prefixes);
+ serd_sink_set_prefix_func(count_prefixes_sink, count_prefixes);
serd_env_set_prefix(env, pre, eg);
- serd_env_foreach(env, count_prefixes, &n_prefixes);
+ serd_env_send_prefixes(env, count_prefixes_sink);
assert(n_prefixes == 1);
SerdNode* shorter_uri = serd_new_uri("urn:foo");