diff options
author | David Robillard <d@drobilla.net> | 2018-06-13 21:32:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-12-31 11:37:48 -0500 |
commit | feb16bc18d586080e979845374f053075e6bb7ed (patch) | |
tree | b4e87632c7689798635ae37a9bd097987a7019dd /src/writer.c | |
parent | b6197eb59799c2933bd776ea22760fea5e97b4bd (diff) | |
download | serd-feb16bc18d586080e979845374f053075e6bb7ed.tar.gz serd-feb16bc18d586080e979845374f053075e6bb7ed.tar.bz2 serd-feb16bc18d586080e979845374f053075e6bb7ed.zip |
Simplify SerdEnv API
Diffstat (limited to 'src/writer.c')
-rw-r--r-- | src/writer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/writer.c b/src/writer.c index 3480b746..4a5d12ab 100644 --- a/src/writer.c +++ b/src/writer.c @@ -513,7 +513,7 @@ write_uri_node(SerdWriter* const writer, } else if (supports_abbrev(writer) && !strcmp(node_str, NS_RDF "nil")) { return sink("()", 2, writer) == 2; } else if (has_scheme && (writer->style & SERD_STYLE_CURIED) && - serd_env_qualify(writer->env, node, &prefix, &suffix) && + serd_env_qualify_in_place(writer->env, node, &prefix, &suffix) && is_name(suffix.buf, suffix.len)) { write_uri_from_node(writer, prefix); sink(":", 1, writer); @@ -561,9 +561,12 @@ write_curie(SerdWriter* const writer, switch (writer->syntax) { case SERD_NTRIPLES: case SERD_NQUADS: - if ((st = serd_env_expand(writer->env, node, &prefix, &suffix))) { - serd_world_errorf(writer->world, st, - "undefined namespace prefix `%s'\n", node_str); + if ((st = serd_env_expand_in_place( + writer->env, node, &prefix, &suffix))) { + serd_world_errorf(writer->world, + st, + "undefined namespace prefix `%s'\n", + node_str); return false; } write_sep(writer, SEP_URI_BEGIN); |