aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/reader.c b/src/reader.c
index 3be28a53..76b28295 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -118,17 +118,12 @@ push_node(SerdReader* reader,
SerdStatus
emit_statement(SerdReader* reader, ReadContext ctx, SerdNode* o)
{
- SerdNode* graph = ctx.graph;
- if (!graph && reader->default_graph) {
- graph = reader->default_graph;
- }
-
/* Zero the pad of the object node on the top of the stack. Lower nodes
(subject and predicate) were already zeroed by subsequent pushes. */
serd_node_zero_pad(o);
const SerdStatus st = serd_sink_write(
- reader->sink, *ctx.flags, ctx.subject, ctx.predicate, o, graph);
+ reader->sink, *ctx.flags, ctx.subject, ctx.predicate, o, ctx.graph);
*ctx.flags &= SERD_ANON_CONT | SERD_LIST_CONT; // Preserve only cont flags
return st;
@@ -162,13 +157,12 @@ serd_reader_new(SerdWorld* const world,
{
SerdReader* me = (SerdReader*)calloc(1, sizeof(SerdReader));
- me->world = world;
- me->sink = sink;
- me->default_graph = NULL;
- me->stack = serd_stack_new(stack_size);
- me->syntax = syntax;
- me->next_id = 1;
- me->strict = true;
+ me->world = world;
+ me->sink = sink;
+ me->stack = serd_stack_new(stack_size);
+ me->syntax = syntax;
+ me->next_id = 1;
+ me->strict = true;
me->rdf_first = push_node(me, SERD_URI, NS_RDF "first", 48);
me->rdf_rest = push_node(me, SERD_URI, NS_RDF "rest", 47);
@@ -191,7 +185,6 @@ serd_reader_free(SerdReader* reader)
}
serd_reader_finish(reader);
- serd_node_free(reader->default_graph);
#ifdef SERD_STACK_CHECK
free(reader->allocs);
@@ -216,13 +209,6 @@ serd_reader_add_blank_prefix(SerdReader* reader, const char* prefix)
}
}
-void
-serd_reader_set_default_graph(SerdReader* reader, const SerdNode* graph)
-{
- serd_node_free(reader->default_graph);
- reader->default_graph = serd_node_copy(graph);
-}
-
static SerdStatus
skip_bom(SerdReader* me)
{