diff options
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -179,9 +179,9 @@ serd_env_qualify(const SerdEnv* const env, const SerdNode* const prefix_uri = &env->prefixes[i].uri; if (uri->n_bytes >= prefix_uri->n_bytes) { if (!strncmp(uri->buf, prefix_uri->buf, prefix_uri->n_bytes)) { - *prefix = env->prefixes[i].name; - suffix->buf = uri->buf + prefix_uri->n_bytes; - suffix->len = uri->n_bytes - prefix_uri->n_bytes; + *prefix = env->prefixes[i].name; + suffix->data = uri->buf + prefix_uri->n_bytes; + suffix->length = uri->n_bytes - prefix_uri->n_bytes; return true; } } @@ -208,10 +208,10 @@ serd_env_expand(const SerdEnv* const env, const size_t name_len = (size_t)(colon - curie->buf); const SerdPrefix* const prefix = serd_env_find(env, curie->buf, name_len); if (prefix) { - uri_prefix->buf = prefix->uri.buf; - uri_prefix->len = prefix->uri.n_bytes; - uri_suffix->buf = colon + 1; - uri_suffix->len = curie->n_bytes - name_len - 1; + uri_prefix->data = prefix->uri.buf; + uri_prefix->length = prefix->uri.n_bytes; + uri_suffix->data = colon + 1; + uri_suffix->length = curie->n_bytes - name_len - 1; return SERD_SUCCESS; } return SERD_BAD_CURIE; @@ -238,10 +238,10 @@ serd_env_expand_node(const SerdEnv* const env, const SerdNode* const node) if (serd_env_expand(env, node, &prefix, &suffix)) { return SERD_NODE_NULL; } - const size_t len = prefix.len + suffix.len; + const size_t len = prefix.length + suffix.length; char* buf = (char*)malloc(len + 1); SerdNode ret = {buf, len, 0, SERD_URI}; - snprintf(buf, ret.n_bytes + 1, "%s%s", prefix.buf, suffix.buf); + snprintf(buf, ret.n_bytes + 1, "%s%s", prefix.data, suffix.data); return ret; } case SERD_BLANK: |