aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/writer.c b/src/writer.c
index e56f0b75..968d1a9f 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -1389,7 +1389,7 @@ serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri)
}
SerdStatus
-serd_writer_set_root_uri(SerdWriter* writer, const SerdNode* uri)
+serd_writer_set_root_uri(SerdWriter* writer, const SerdStringView uri)
{
assert(writer);
@@ -1397,8 +1397,8 @@ serd_writer_set_root_uri(SerdWriter* writer, const SerdNode* uri)
writer->root_node = NULL;
writer->root_uri = SERD_URI_NULL;
- if (uri) {
- writer->root_node = serd_node_copy(uri);
+ if (uri.len) {
+ writer->root_node = serd_new_uri(uri);
writer->root_uri = serd_node_uri_view(writer->root_node);
}