diff options
author | David Robillard <d@drobilla.net> | 2023-08-30 20:43:05 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d (patch) | |
tree | d7be35c7b4b3d466049352f2975e2c88c298f4b8 /src/read_turtle.c | |
parent | b13ad41a4d65b577b4db67660a9edf3056bdf7af (diff) | |
download | serd-258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d.tar.gz serd-258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d.tar.bz2 serd-258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d.zip |
Use ZixStringView directly
Diffstat (limited to 'src/read_turtle.c')
-rw-r--r-- | src/read_turtle.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/read_turtle.c b/src/read_turtle.c index 03d1950f..c6982327 100644 --- a/src/read_turtle.c +++ b/src/read_turtle.c @@ -21,9 +21,9 @@ #include "serd/sink.h" #include "serd/statement.h" #include "serd/status.h" -#include "serd/string_view.h" #include "serd/uri.h" #include "zix/attributes.h" +#include "zix/string_view.h" #include <assert.h> #include <stdbool.h> @@ -396,8 +396,8 @@ read_PrefixedName(SerdReader* const reader, skip_byte(reader, ':'); // Search environment for the prefix URI - const SerdStringView prefix = serd_node_string_view(dest); - const SerdStringView prefix_uri = serd_env_find_prefix(reader->env, prefix); + const ZixStringView prefix = serd_node_string_view(dest); + const ZixStringView prefix_uri = serd_env_find_prefix(reader->env, prefix); if (!prefix_uri.length) { return r_err(reader, st, "unknown prefix \"%s\"", prefix.data); } @@ -645,7 +645,7 @@ read_anon(SerdReader* const reader, } static bool -node_has_string(const SerdNode* const node, const SerdStringView string) +node_has_string(const SerdNode* const node, const ZixStringView string) { return node->length == string.length && !memcmp(serd_node_string(node), string.data, string.length); @@ -657,10 +657,10 @@ read_named_object(SerdReader* const reader, SerdNode** const dest, bool* const ate_dot) { - static const char* const XSD_BOOLEAN = NS_XSD "boolean"; - static const size_t XSD_BOOLEAN_LEN = 40; - static const SerdStringView true_string = {"true", 4U}; - static const SerdStringView false_string = {"false", 5U}; + static const char* const XSD_BOOLEAN = NS_XSD "boolean"; + static const size_t XSD_BOOLEAN_LEN = 40; + static const ZixStringView true_string = ZIX_STATIC_STRING("true"); + static const ZixStringView false_string = ZIX_STATIC_STRING("false"); /* This function deals with nodes that start with some letters. Unlike everything else, the cases here aren't nicely distinguished by leading |