aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-12 18:24:19 +0200
committerDavid Robillard <d@drobilla.net>2021-03-07 15:32:23 -0500
commit37acc7772335e5a0987531fb42f0dd9e529b3b4d (patch)
treecb9cb1374ccdea28e5bcb1afad325a51a7cd5c2d /src
parent88402a1cddba79e339fc92037be2449c429c0780 (diff)
downloadserd-37acc7772335e5a0987531fb42f0dd9e529b3b4d.tar.gz
serd-37acc7772335e5a0987531fb42f0dd9e529b3b4d.tar.bz2
serd-37acc7772335e5a0987531fb42f0dd9e529b3b4d.zip
Remove "get" from accessor names
Diffstat (limited to 'src')
-rw-r--r--src/env.c2
-rw-r--r--src/reader.c2
-rw-r--r--src/writer.c13
3 files changed, 10 insertions, 7 deletions
diff --git a/src/env.c b/src/env.c
index 0538db69..caf50b08 100644
--- a/src/env.c
+++ b/src/env.c
@@ -62,7 +62,7 @@ serd_env_free(SerdEnv* env)
}
const SerdNode*
-serd_env_get_base_uri(const SerdEnv* env, SerdURIView* out)
+serd_env_base_uri(const SerdEnv* env, SerdURIView* out)
{
if (out) {
*out = env->base_uri;
diff --git a/src/reader.c b/src/reader.c
index fa84d7d7..9b4fe189 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -246,7 +246,7 @@ serd_reader_free(SerdReader* reader)
}
void*
-serd_reader_get_handle(const SerdReader* reader)
+serd_reader_handle(const SerdReader* reader)
{
return reader->handle;
}
diff --git a/src/writer.c b/src/writer.c
index 24c56895..89600e9c 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -579,6 +579,10 @@ write_uri_node(SerdWriter* const writer,
return sink("a", 1, writer) == 1;
}
+ if (!strcmp(node->buf, NS_RDF "nil")) {
+ return sink("()", 2, writer) == 2;
+ }
+
if (has_scheme && (writer->flags & SERD_WRITE_CURIED) &&
serd_env_qualify(writer->env, node, &prefix, &suffix) &&
is_name(suffix.buf, suffix.len)) {
@@ -590,7 +594,7 @@ write_uri_node(SerdWriter* const writer,
}
if (!has_scheme && !supports_uriref(writer) &&
- !serd_env_get_base_uri(writer->env, NULL)->buf) {
+ !serd_env_base_uri(writer->env, NULL)->buf) {
w_err(writer,
SERD_ERR_BAD_ARG,
"syntax does not support URI reference <%s>\n",
@@ -603,7 +607,7 @@ write_uri_node(SerdWriter* const writer,
SerdURIView in_base_uri;
SerdURIView uri;
SerdURIView abs_uri;
- serd_env_get_base_uri(writer->env, &in_base_uri);
+ serd_env_base_uri(writer->env, &in_base_uri);
serd_uri_parse(node->buf, &uri);
serd_uri_resolve(&uri, &in_base_uri, &abs_uri);
bool rooted = uri_is_under(&writer->base_uri, &writer->root_uri);
@@ -1006,7 +1010,7 @@ SerdStatus
serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri)
{
if (!serd_env_set_base_uri(writer->env, uri)) {
- serd_env_get_base_uri(writer->env, &writer->base_uri);
+ serd_env_base_uri(writer->env, &writer->base_uri);
if (writer->syntax == SERD_TURTLE || writer->syntax == SERD_TRIG) {
if (writer->context.graph.type || writer->context.subject.type) {
@@ -1020,7 +1024,6 @@ serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri)
writer->indent = 0;
return reset_context(writer, true);
}
-
return SERD_ERR_UNKNOWN;
}
@@ -1080,7 +1083,7 @@ serd_writer_free(SerdWriter* writer)
}
SerdEnv*
-serd_writer_get_env(SerdWriter* writer)
+serd_writer_env(SerdWriter* writer)
{
return writer->env;
}