summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sratom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sratom.c b/src/sratom.c
index 8c2249c..584be8c 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -424,6 +424,14 @@ sratom_write(Sratom* sratom,
}
if (object.buf) {
+ SerdNode def_s = serd_node_from_string(SERD_BLANK, USTR("atom"));
+ SerdNode def_p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value"));
+ if (!subject) {
+ subject = &def_s;
+ }
+ if (!predicate) {
+ predicate = &def_p;
+ }
sratom->write_statement(sratom->handle, flags, NULL,
subject, predicate, &object, &datatype, &language);
}