diff options
author | David Robillard <d@drobilla.net> | 2016-03-16 16:54:49 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 09:21:03 +0100 |
commit | 9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc (patch) | |
tree | 8c1f24ce028b8f0086120c909906dda6efd8e98c /src | |
parent | 5e60861c65b84ef7569a26920a7ff2401c1e14d0 (diff) | |
download | serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.tar.gz serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.tar.bz2 serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.zip |
Rename SerdChunk to SerdSlice
Diffstat (limited to 'src')
-rw-r--r-- | src/env.c | 10 | ||||
-rw-r--r-- | src/serd_internal.h | 6 | ||||
-rw-r--r-- | src/uri.c | 2 | ||||
-rw-r--r-- | src/writer.c | 6 |
4 files changed, 12 insertions, 12 deletions
@@ -158,7 +158,7 @@ bool serd_env_qualify(const SerdEnv* env, const SerdNode* uri, SerdNode* prefix, - SerdChunk* suffix) + SerdSlice* suffix) { for (size_t i = 0; i < env->n_prefixes; ++i) { const SerdNode* const prefix_uri = &env->prefixes[i].uri; @@ -179,8 +179,8 @@ serd_env_qualify(const SerdEnv* env, SerdStatus serd_env_expand(const SerdEnv* env, const SerdNode* curie, - SerdChunk* uri_prefix, - SerdChunk* uri_suffix) + SerdSlice* uri_prefix, + SerdSlice* uri_suffix) { const char* const colon = (const char*)memchr( curie->buf, ':', curie->n_bytes + 1); @@ -206,8 +206,8 @@ serd_env_expand_node(const SerdEnv* env, { switch (node->type) { case SERD_CURIE: { - SerdChunk prefix; - SerdChunk suffix; + SerdSlice prefix; + SerdSlice suffix; if (serd_env_expand(env, node, &prefix, &suffix)) { return SERD_NODE_NULL; } diff --git a/src/serd_internal.h b/src/serd_internal.h index 99a76a53..18141b8a 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -438,7 +438,7 @@ parse_utf8_char(const uint8_t* utf8, size_t* size) /* URI utilities */ static inline bool -chunk_equals(const SerdChunk* a, const SerdChunk* b) +slice_equals(const SerdSlice* a, const SerdSlice* b) { return a->len == b->len && !strncmp((const char*)a->buf, (const char*)b->buf, a->len); @@ -468,8 +468,8 @@ static inline size_t uri_rooted_index(const SerdURI* uri, const SerdURI* root) { 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 0; } @@ -310,7 +310,7 @@ remove_dot_segments(const char* path, size_t len, size_t* up) /// Merge `base` and `path` in-place static void -merge(SerdChunk* base, SerdChunk* path) +merge(SerdSlice* base, SerdSlice* path) { size_t up; const char* begin = remove_dot_segments(path->buf, path->len, &up); diff --git a/src/writer.c b/src/writer.c index a9a2b5dd..f9897fde 100644 --- a/src/writer.c +++ b/src/writer.c @@ -482,7 +482,7 @@ write_uri_node(SerdWriter* const writer, const SerdStatementFlags flags) { SerdNode prefix; - SerdChunk suffix; + SerdSlice suffix; if (is_inline_start(writer, field, flags)) { ++writer->indent; @@ -539,8 +539,8 @@ write_curie(SerdWriter* const writer, const Field field, const SerdStatementFlags flags) { - SerdChunk prefix; - SerdChunk suffix; + SerdSlice prefix; + SerdSlice suffix; SerdStatus st; switch (writer->syntax) { case SERD_NTRIPLES: |