diff options
-rw-r--r-- | include/serd/serd.h | 8 | ||||
-rw-r--r-- | src/env.c | 2 | ||||
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | src/writer.c | 8 | ||||
-rw-r--r-- | test/test_env.c | 6 | ||||
-rw-r--r-- | test/test_reader_writer.c | 10 |
6 files changed, 18 insertions, 18 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 3486cc95..ba78b7e9 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -592,8 +592,8 @@ serd_env_free(SerdEnv* SERD_NULLABLE env); /// Get the current base URI SERD_API const SerdNode* SERD_NONNULL -serd_env_get_base_uri(const SerdEnv* SERD_NONNULL env, - SerdURIView* SERD_NULLABLE out); +serd_env_base_uri(const SerdEnv* SERD_NONNULL env, + SerdURIView* SERD_NULLABLE out); /// Set the current base URI SERD_API SerdStatus @@ -695,7 +695,7 @@ serd_reader_set_error_sink(SerdReader* SERD_NONNULL reader, /// Return the `handle` passed to serd_reader_new() SERD_PURE_API void* SERD_NULLABLE -serd_reader_get_handle(const SerdReader* SERD_NONNULL reader); +serd_reader_handle(const SerdReader* SERD_NONNULL reader); /** Set a prefix to be added to all blank node identifiers. @@ -849,7 +849,7 @@ serd_writer_free(SerdWriter* SERD_NULLABLE writer); /// Return the env used by `writer` SERD_PURE_API SerdEnv* SERD_NONNULL -serd_writer_get_env(SerdWriter* SERD_NONNULL writer); +serd_writer_env(SerdWriter* SERD_NONNULL writer); /** A convenience sink function for writing to a FILE*. @@ -52,7 +52,7 @@ serd_env_free(SerdEnv* const env) } const SerdNode* -serd_env_get_base_uri(const SerdEnv* const env, SerdURIView* const out) +serd_env_base_uri(const SerdEnv* const env, SerdURIView* const out) { if (out) { *out = env->base_uri; diff --git a/src/reader.c b/src/reader.c index 8a376b28..f34de787 100644 --- a/src/reader.c +++ b/src/reader.c @@ -235,7 +235,7 @@ serd_reader_free(SerdReader* const reader) } void* -serd_reader_get_handle(const SerdReader* const reader) +serd_reader_handle(const SerdReader* const reader) { return reader->handle; } diff --git a/src/writer.c b/src/writer.c index 6bc69c78..eea85ddf 100644 --- a/src/writer.c +++ b/src/writer.c @@ -742,7 +742,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) { return w_err(writer, SERD_ERR_BAD_ARG, "syntax does not support URI reference <%s>\n", @@ -755,7 +755,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); @@ -1173,7 +1173,7 @@ serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri) TRY(st, 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 (uri && (writer->syntax == SERD_TURTLE || writer->syntax == SERD_TRIG)) { TRY(st, terminate_context(writer)); @@ -1244,7 +1244,7 @@ serd_writer_free(SerdWriter* writer) } SerdEnv* -serd_writer_get_env(SerdWriter* writer) +serd_writer_env(SerdWriter* writer) { return writer->env; } diff --git a/test/test_env.c b/test/test_env.c index 2d9dd702..2db28f2d 100644 --- a/test/test_env.c +++ b/test/test_env.c @@ -29,7 +29,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; @@ -76,9 +76,9 @@ test_env(void) assert(!serd_env_qualify(env, &shorter_uri, &prefix_name, &suffix)); assert(!serd_env_set_base_uri(env, &u)); - assert(serd_node_equals(serd_env_get_base_uri(env, NULL), &u)); + assert(serd_node_equals(serd_env_base_uri(env, NULL), &u)); assert(!serd_env_set_base_uri(env, NULL)); - assert(!serd_env_get_base_uri(env, NULL)->buf); + assert(!serd_env_base_uri(env, NULL)->buf); serd_env_free(env); } diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index d6752d4b..4acfb976 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -186,7 +186,7 @@ test_read_nquads_chunks(const char* const path) test_end_sink); 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); @@ -266,7 +266,7 @@ test_read_turtle_chunks(const char* const path) test_end_sink); 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); @@ -348,7 +348,7 @@ test_read_string(void) test_end_sink); 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 = @@ -452,7 +452,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, ""); @@ -566,7 +566,7 @@ test_reader(const char* path) test_end_sink); assert(reader); - assert(serd_reader_get_handle(reader) == rt); + assert(serd_reader_handle(reader) == rt); assert(serd_reader_read_chunk(reader) == SERD_FAILURE); |