aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/writer.c b/src/writer.c
index 1de5e055..7afeb1c4 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -140,8 +140,6 @@ struct SerdWriterImpl {
size_t anon_stack_size;
SerdBlockDumper output;
WriteContext context;
- char* bprefix;
- size_t bprefix_len;
Sep last_sep;
int indent;
};
@@ -901,17 +899,7 @@ write_blank(SerdWriter* const writer,
}
TRY(st, esink("_:", 2, writer));
- if (writer->bprefix &&
- !strncmp(node_str, writer->bprefix, writer->bprefix_len)) {
- TRY(st,
- esink(node_str + writer->bprefix_len,
- node->length - writer->bprefix_len,
- writer));
- } else {
- TRY(st, esink(node_str, node->length, writer));
- }
-
- return st;
+ return esink(node_str, node->length, writer);
}
SERD_NODISCARD static SerdStatus
@@ -1382,25 +1370,7 @@ serd_writer_new(SerdWorld* world,
return writer;
}
-void
-serd_writer_chop_blank_prefix(SerdWriter* writer, const char* prefix)
-{
- assert(writer);
-
- serd_wfree(writer->world, writer->bprefix);
- writer->bprefix_len = 0;
- writer->bprefix = NULL;
-
- const size_t prefix_len = prefix ? strlen(prefix) : 0;
- if (prefix_len) {
- writer->bprefix_len = prefix_len;
- writer->bprefix =
- (char*)serd_wmalloc(writer->world, writer->bprefix_len + 1);
- memcpy(writer->bprefix, prefix, writer->bprefix_len + 1);
- }
-}
-
-SERD_NODISCARD static SerdStatus
+static SerdStatus
serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri)
{
assert(writer);
@@ -1482,7 +1452,6 @@ serd_writer_free(SerdWriter* writer)
free_anon_stack(writer);
serd_block_dumper_close(&writer->output);
serd_wfree(writer->world, writer->anon_stack);
- serd_wfree(writer->world, writer->bprefix);
serd_node_free(writer->world->allocator, writer->root_node);
serd_wfree(writer->world, writer);
}