aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/reader.c b/src/reader.c
index f375be42..640fb12b 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -36,7 +36,7 @@ r_err(SerdReader* reader, SerdStatus st, const char* fmt, ...)
va_start(args, fmt);
const Cursor* const cur = &reader->source.cur;
const SerdError e = {st, cur->filename, cur->line, cur->col, fmt, &args};
- serd_error(reader->error_func, reader->error_handle, &e);
+ serd_error(reader->world, &e);
va_end(args);
return st;
}
@@ -154,10 +154,14 @@ serd_reader_read_document(SerdReader* reader)
}
SerdReader*
-serd_reader_new(SerdSyntax syntax, const SerdSink* sink, size_t stack_size)
+serd_reader_new(SerdWorld* const world,
+ const SerdSyntax syntax,
+ const SerdSink* const sink,
+ const size_t stack_size)
{
SerdReader* me = (SerdReader*)calloc(1, sizeof(SerdReader));
+ me->world = world;
me->sink = sink;
me->default_graph = NULL;
me->stack = serd_stack_new(stack_size);
@@ -179,15 +183,6 @@ serd_reader_set_strict(SerdReader* reader, bool strict)
}
void
-serd_reader_set_error_sink(SerdReader* reader,
- SerdErrorFunc error_func,
- void* error_handle)
-{
- reader->error_func = error_func;
- reader->error_handle = error_handle;
-}
-
-void
serd_reader_free(SerdReader* reader)
{
if (!reader) {