From b983d2a94b0f84b4c06889be77fbdacc502f2d7b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 20 Feb 2021 19:18:28 -0500 Subject: Replace multiple stream callbacks with SerdEvent This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future. --- src/env.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/env.c') diff --git a/src/env.c b/src/env.c index f7c8c6ba..6ff8e3f5 100644 --- a/src/env.c +++ b/src/env.c @@ -264,9 +264,9 @@ serd_env_expand(const SerdEnv* env, const SerdNode* node) } void -serd_env_foreach(const SerdEnv* env, SerdPrefixFunc func, void* handle) +serd_env_write_prefixes(const SerdEnv* env, const SerdSink* sink) { for (size_t i = 0; i < env->n_prefixes; ++i) { - func(handle, env->prefixes[i].name, env->prefixes[i].uri); + serd_sink_write_prefix(sink, env->prefixes[i].name, env->prefixes[i].uri); } } -- cgit v1.2.1