From c8e0e8cca88238b5506f1dfe09e9de081ff292dd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 May 2011 17:58:43 +0000 Subject: Remove unused object component of write context. git-svn-id: http://svn.drobilla.net/serd/trunk@192 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/writer.c | 11 ++--------- 1 file 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; -- cgit v1.2.1