aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/env.c10
-rw-r--r--src/uri.c2
-rw-r--r--src/uri_utils.h6
-rw-r--r--src/writer.c12
4 files changed, 15 insertions, 15 deletions
diff --git a/src/env.c b/src/env.c
index 73100fd3..7c4aca48 100644
--- a/src/env.c
+++ b/src/env.c
@@ -169,7 +169,7 @@ bool
serd_env_qualify(const SerdEnv* const env,
const SerdNode* const uri,
SerdNode* const prefix,
- SerdChunk* const suffix)
+ SerdStringView* const suffix)
{
if (!env) {
return false;
@@ -192,8 +192,8 @@ serd_env_qualify(const SerdEnv* const env,
SerdStatus
serd_env_expand(const SerdEnv* const env,
const SerdNode* const curie,
- SerdChunk* const uri_prefix,
- SerdChunk* const uri_suffix)
+ SerdStringView* const uri_prefix,
+ SerdStringView* const uri_suffix)
{
if (!env) {
return SERD_ERR_BAD_CURIE;
@@ -233,8 +233,8 @@ serd_env_expand_node(const SerdEnv* const env, const SerdNode* const node)
return serd_node_new_uri_from_node(node, &env->base_uri, &ignored);
}
case SERD_CURIE: {
- SerdChunk prefix;
- SerdChunk suffix;
+ SerdStringView prefix;
+ SerdStringView suffix;
if (serd_env_expand(env, node, &prefix, &suffix)) {
return SERD_NODE_NULL;
}
diff --git a/src/uri.c b/src/uri.c
index c25f2155..18154329 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -232,7 +232,7 @@ remove_dot_segments(const char* const path, const size_t len, size_t* const up)
/// Merge `base` and `path` in-place
static void
-merge(SerdChunk* const base, SerdChunk* const path)
+merge(SerdStringView* const base, SerdStringView* const path)
{
size_t up = 0;
const char* begin = remove_dot_segments(path->buf, path->len, &up);
diff --git a/src/uri_utils.h b/src/uri_utils.h
index c9f3ecf5..9146ee79 100644
--- a/src/uri_utils.h
+++ b/src/uri_utils.h
@@ -17,7 +17,7 @@ typedef struct {
} SlashIndexes;
static inline bool
-chunk_equals(const SerdChunk* a, const SerdChunk* b)
+slice_equals(const SerdStringView* a, const SerdStringView* b)
{
return a->len == b->len && !strncmp(a->buf, b->buf, a->len);
}
@@ -52,8 +52,8 @@ uri_rooted_index(const SerdURI* uri, const SerdURI* root)
SlashIndexes indexes = {SIZE_MAX, SIZE_MAX};
if (!root || !root->scheme.len ||
- !chunk_equals(&root->scheme, &uri->scheme) ||
- !chunk_equals(&root->authority, &uri->authority)) {
+ !slice_equals(&root->scheme, &uri->scheme) ||
+ !slice_equals(&root->authority, &uri->authority)) {
return indexes;
}
diff --git a/src/writer.c b/src/writer.c
index 241e6fbf..8070392f 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -717,9 +717,9 @@ write_uri_node(SerdWriter* const writer,
const SerdNode* node,
const Field field)
{
- SerdStatus st = SERD_SUCCESS;
- SerdNode prefix = SERD_NODE_NULL;
- SerdChunk suffix = {NULL, 0U};
+ SerdStatus st = SERD_SUCCESS;
+ SerdNode prefix;
+ SerdStringView suffix;
const bool has_scheme = serd_uri_string_has_scheme(node->buf);
if (supports_abbrev(writer)) {
@@ -778,9 +778,9 @@ write_uri_node(SerdWriter* const writer,
SERD_NODISCARD static SerdStatus
write_curie(SerdWriter* const writer, const SerdNode* const node)
{
- SerdChunk prefix = {NULL, 0};
- SerdChunk suffix = {NULL, 0};
- SerdStatus st = SERD_SUCCESS;
+ SerdStringView prefix = {NULL, 0};
+ SerdStringView suffix = {NULL, 0};
+ SerdStatus st = SERD_SUCCESS;
// In fast-and-loose Turtle/TriG mode CURIEs are simply passed through
const bool fast =