aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-24 17:58:43 +0000
committerDavid Robillard <d@drobilla.net>2011-05-24 17:58:43 +0000
commitc8e0e8cca88238b5506f1dfe09e9de081ff292dd (patch)
treec7e53f30725ca7f3546b036d81b6755183586ac8
parentba61f0950156b04dfae0320927543420020b7fc9 (diff)
downloadserd-c8e0e8cca88238b5506f1dfe09e9de081ff292dd.tar.gz
serd-c8e0e8cca88238b5506f1dfe09e9de081ff292dd.tar.bz2
serd-c8e0e8cca88238b5506f1dfe09e9de081ff292dd.zip
Remove unused object component of write context.
git-svn-id: http://svn.drobilla.net/serd/trunk@192 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--src/writer.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/writer.c b/src/writer.c
index 550337a7..a1004ca9 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -28,11 +28,10 @@ typedef struct {
SerdNode graph;
SerdNode subject;
SerdNode predicate;
- SerdNode object;
} WriteContext;
static const WriteContext WRITE_CONTEXT_NULL = {
- {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}
+ {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}
};
struct SerdWriterImpl {
@@ -178,8 +177,6 @@ reset_context(SerdWriter* writer)
serd_node_free(&writer->context.subject);
if (writer->context.predicate.buf)
serd_node_free(&writer->context.predicate);
- if (writer->context.object.buf)
- serd_node_free(&writer->context.object);
writer->context = WRITE_CONTEXT_NULL;
writer->empty = false;
}
@@ -353,9 +350,6 @@ serd_writer_write_statement(SerdWriter* writer,
if (writer->context.predicate.buf)
serd_node_free(&writer->context.predicate);
writer->context.predicate = serd_node_copy(predicate);
- if (writer->context.object.buf)
- serd_node_free(&writer->context.object);
- writer->context.object = serd_node_copy(object);
writer->sink(" ", 1, writer->stream);
write_node(writer, object, object_datatype, object_lang,
FIELD_OBJECT, flags);
@@ -404,8 +398,7 @@ serd_writer_write_statement(SerdWriter* writer,
const WriteContext new_context = { serd_node_copy(graph),
serd_node_copy(subject),
- serd_node_copy(predicate),
- serd_node_copy(object) };
+ serd_node_copy(predicate) };
reset_context(writer);
writer->context = new_context;
return SERD_SUCCESS;