From 0a375ebfb29b08d55824d9c18ea3812b8f6b9010 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Apr 2018 15:24:05 +0200 Subject: Add SerdWorld for shared library state --- src/serd_internal.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/serd_internal.h') diff --git a/src/serd_internal.h b/src/serd_internal.h index fbf493e9..172343b8 100644 --- a/src/serd_internal.h +++ b/src/serd_internal.h @@ -27,6 +27,8 @@ #include "serd/serd.h" #include "serd_config.h" +#include "world.h" + #if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO) # include #endif @@ -68,10 +70,10 @@ serd_bufalloc(size_t size) } static inline void -serd_error(SerdErrorSink error_sink, void* handle, const SerdError* e) +serd_error(const SerdWorld* world, const SerdError* e) { - if (error_sink) { - error_sink(handle, e); + if (world->error_sink) { + world->error_sink(world->error_handle, e); } else { fprintf(stderr, "error: %s:%u:%u: ", e->filename, e->line, e->col); vfprintf(stderr, e->fmt, *e->args); -- cgit v1.2.1