diff options
-rw-r--r-- | serd/serd.h | 7 | ||||
-rw-r--r-- | src/env.c | 1 | ||||
-rw-r--r-- | src/node.c | 2 | ||||
-rw-r--r-- | src/writer.c | 2 | ||||
-rw-r--r-- | tests/serd_test.c | 19 |
5 files changed, 1 insertions, 30 deletions
diff --git a/serd/serd.h b/serd/serd.h index 39b80b3b..fc1ac5ff 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -158,13 +158,6 @@ typedef uint32_t SerdStatementFlags; */ typedef enum { /** - The type of a nonexistent node. - - This type is useful as a sentinel, but is never emitted by the reader. - */ - SERD_NOTHING = 0, - - /** Literal value. A literal optionally has either a language, or a datatype (not both). @@ -220,7 +220,6 @@ serd_env_expand_node(const SerdEnv* env, const SerdNode* node) { switch (node->type) { - case SERD_NOTHING: case SERD_LITERAL: break; case SERD_URI: { @@ -388,7 +388,7 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) SerdType serd_node_type(const SerdNode* node) { - return node ? node->type : SERD_NOTHING; + return node->type; } const char* diff --git a/src/writer.c b/src/writer.c index c3ccffb2..aea714f3 100644 --- a/src/writer.c +++ b/src/writer.c @@ -652,8 +652,6 @@ write_node(SerdWriter* writer, { bool ret = false; switch (node->type) { - case SERD_NOTHING: - break; case SERD_LITERAL: ret = write_literal(writer, node, datatype, lang, flags); break; diff --git a/tests/serd_test.c b/tests/serd_test.c index bd467837..330ca985 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -592,25 +592,6 @@ test_writer(const char* const path) assert(!strcmp(out, "@base <http://example.org/base> .\n")); serd_free(out); - // Test writing empty node - SerdNode* nothing = serd_node_new_string(SERD_NOTHING, ""); - FILE* const empty = tmpfile(); - - writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, serd_file_sink, empty); - - // FIXME: error handling - serd_writer_write_statement(writer, 0, NULL, - s, p, nothing, NULL, NULL); - - assert((size_t)ftell(empty) == strlen("<>\n\t<http://example.org/pred> ")); - - serd_writer_free(writer); - fclose(empty); - serd_node_free(nothing); - serd_node_free(s); - serd_node_free(p); - serd_env_free(env); fclose(fd); } |