diff options
author | David Robillard <d@drobilla.net> | 2020-10-10 12:31:29 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 155f5e2f24c24f5b5ffbf13fcea5cf1a355ec372 (patch) | |
tree | 5f5f7009e96379aa0e31cb1db3757f8d6589669f /src/writer.c | |
parent | e8f392d57bf6eba9b62509a32e4073e8b34b18e2 (diff) | |
download | serd-155f5e2f24c24f5b5ffbf13fcea5cf1a355ec372.tar.gz serd-155f5e2f24c24f5b5ffbf13fcea5cf1a355ec372.tar.bz2 serd-155f5e2f24c24f5b5ffbf13fcea5cf1a355ec372.zip |
[WIP] Simplify reader and writer flags
[WIP] Testing?
Diffstat (limited to 'src/writer.c')
-rw-r--r-- | src/writer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/writer.c b/src/writer.c index 31daa71c..fa1abd9f 100644 --- a/src/writer.c +++ b/src/writer.c @@ -801,10 +801,10 @@ write_literal(SerdWriter* const writer, SERD_NODISCARD static SerdStatus write_full_uri_node(SerdWriter* const writer, const SerdNode* const node) { - SerdStatus st = SERD_SUCCESS; - const bool resolve_disabled = writer->flags & SERD_WRITE_UNRESOLVED; + SerdStatus st = SERD_SUCCESS; + const bool verbatim = (writer->flags & SERD_WRITE_VERBATIM); - if (resolve_disabled || !serd_env_base_uri(writer->env)) { + if (verbatim || !serd_env_base_uri(writer->env)) { // Resolution disabled or we have no base URI, simply write the node TRY(st, esink("<", 1, writer)); TRY(st, write_uri_from_node(writer, node)); @@ -855,7 +855,7 @@ write_uri_node(SerdWriter* const writer, SerdStringView prefix = {NULL, 0}; SerdStringView suffix = {NULL, 0}; - if (has_scheme && !(writer->flags & SERD_WRITE_UNQUALIFIED) && + if (has_scheme && !(writer->flags & SERD_WRITE_EXPANDED) && !serd_env_qualify(writer->env, string, &prefix, &suffix)) { TRY(st, write_lname(writer, prefix.data, prefix.length)); TRY(st, esink(":", 1, writer)); |