diff options
-rw-r--r-- | serd/serd.h | 7 | ||||
-rw-r--r-- | src/env.c | 3 | ||||
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | src/writer.c | 6 | ||||
-rw-r--r-- | tests/env_test.c | 2 | ||||
-rw-r--r-- | tests/serd_test.c | 8 |
6 files changed, 13 insertions, 15 deletions
diff --git a/serd/serd.h b/serd/serd.h index 1963ff6b..fdebc4d1 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -700,8 +700,7 @@ serd_env_free(SerdEnv* env); */ SERD_API const SerdNode* -serd_env_get_base_uri(const SerdEnv* env, - SerdURI* out); +serd_env_base_uri(const SerdEnv* env, SerdURI* out); /** Set the current base URI. @@ -818,7 +817,7 @@ serd_reader_set_error_sink(SerdReader* reader, */ SERD_API void* -serd_reader_get_handle(const SerdReader* reader); +serd_reader_handle(const SerdReader* reader); /** Set a prefix to be added to all blank node identifiers. @@ -968,7 +967,7 @@ serd_writer_free(SerdWriter* writer); */ SERD_API SerdEnv* -serd_writer_get_env(SerdWriter* writer); +serd_writer_env(SerdWriter* writer); /** A convenience sink function for writing to a FILE*. @@ -60,8 +60,7 @@ serd_env_free(SerdEnv* env) } const SerdNode* -serd_env_get_base_uri(const SerdEnv* env, - SerdURI* out) +serd_env_base_uri(const SerdEnv* env, SerdURI* out) { if (out) { *out = env->base_uri; diff --git a/src/reader.c b/src/reader.c index 11ce520d..70fc8eb2 100644 --- a/src/reader.c +++ b/src/reader.c @@ -239,7 +239,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 bf4ccaa8..26d0427a 100644 --- a/src/writer.c +++ b/src/writer.c @@ -530,7 +530,7 @@ write_uri_node(SerdWriter* const writer, SerdURI in_base_uri; SerdURI uri; SerdURI 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); @@ -918,7 +918,7 @@ 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) { @@ -989,7 +989,7 @@ serd_writer_free(SerdWriter* writer) } SerdEnv* -serd_writer_get_env(SerdWriter* writer) +serd_writer_env(SerdWriter* writer) { return writer->env; } diff --git a/tests/env_test.c b/tests/env_test.c index 4131e4cf..9a56befb 100644 --- a/tests/env_test.c +++ b/tests/env_test.c @@ -42,7 +42,7 @@ test_env(void) assert(serd_env_set_base_uri(env, NULL)); assert(serd_env_set_base_uri(env, &SERD_NODE_NULL)); - assert(serd_node_equals(serd_env_get_base_uri(env, NULL), &SERD_NODE_NULL)); + assert(serd_node_equals(serd_env_base_uri(env, NULL), &SERD_NODE_NULL)); SerdStringView prefix; SerdStringView suffix; diff --git a/tests/serd_test.c b/tests/serd_test.c index 7f4c291b..15e50892 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -136,7 +136,7 @@ test_read_chunks(void) serd_reader_new(SERD_TURTLE, rt, free, NULL, NULL, test_sink, NULL); assert(reader); - assert(serd_reader_get_handle(reader) == rt); + assert(serd_reader_handle(reader) == rt); assert(f); SerdStatus st = serd_reader_start_stream(reader, f, NULL, false); @@ -192,7 +192,7 @@ test_read_string(void) SERD_TURTLE, rt, free, NULL, NULL, test_sink, NULL); assert(reader); - assert(serd_reader_get_handle(reader) == rt); + assert(serd_reader_handle(reader) == rt); // Test reading a string that ends exactly at the end of input (no newline) const SerdStatus st = @@ -499,7 +499,7 @@ test_writer(const char* const path) assert(serd_writer_set_base_uri(writer, &lit)); assert(serd_writer_set_prefix(writer, &lit, &lit)); assert(serd_writer_end_anon(writer, NULL)); - assert(serd_writer_get_env(writer) == env); + assert(serd_writer_env(writer) == env); uint8_t buf[] = { 0xEF, 0xBF, 0xBD, 0 }; SerdNode s = serd_node_from_string(SERD_URI, ""); @@ -599,7 +599,7 @@ test_reader(const char* path) SERD_TURTLE, rt, free, NULL, NULL, test_sink, NULL); assert(reader); - assert(serd_reader_get_handle(reader) == rt); + assert(serd_reader_handle(reader) == rt); SerdNode g = serd_node_from_string(SERD_URI, "http://example.org/"); serd_reader_set_default_graph(reader, &g); |