aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 19:24:59 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit846553f8894264d64cdd1dfb08df56fe08189dac (patch)
tree6ca8d42da04999851491edcf6811d05d4962bcac /src/writer.c
parent7c6c3159d1804f4855d9a4e0cd52486f61fcbab6 (diff)
downloadserd-846553f8894264d64cdd1dfb08df56fe08189dac.tar.gz
serd-846553f8894264d64cdd1dfb08df56fe08189dac.tar.bz2
serd-846553f8894264d64cdd1dfb08df56fe08189dac.zip
Add SerdStatement
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/writer.c b/src/writer.c
index 8800282d..4160c09d 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -773,13 +773,15 @@ write_list_obj(SerdWriter* writer,
}
static SerdStatus
-serd_writer_write_statement(SerdWriter* writer,
- SerdStatementFlags flags,
- const SerdNode* graph,
- const SerdNode* subject,
- const SerdNode* predicate,
- const SerdNode* object)
+serd_writer_write_statement(SerdWriter* writer,
+ SerdStatementFlags flags,
+ const SerdStatement* statement)
{
+ const SerdNode* const subject = serd_statement_subject(statement);
+ const SerdNode* const predicate = serd_statement_predicate(statement);
+ const SerdNode* const object = serd_statement_object(statement);
+ const SerdNode* const graph = serd_statement_graph(statement);
+
if (!is_resource(subject) || !is_resource(predicate) || !object) {
return SERD_ERR_BAD_ARG;
}