aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-04-29 15:24:05 +0200
committerDavid Robillard <d@drobilla.net>2019-04-13 19:15:32 +0200
commit0a375ebfb29b08d55824d9c18ea3812b8f6b9010 (patch)
tree50c2c7f9a0f2453465f8ac0b5c2cf503730f443e /src/serd_internal.h
parent38ab5fbb4dd2bc6cb24b80cc346546677f3d2813 (diff)
downloadserd-0a375ebfb29b08d55824d9c18ea3812b8f6b9010.tar.gz
serd-0a375ebfb29b08d55824d9c18ea3812b8f6b9010.tar.bz2
serd-0a375ebfb29b08d55824d9c18ea3812b8f6b9010.zip
Add SerdWorld for shared library state
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h8
1 files changed, 5 insertions, 3 deletions
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 <fcntl.h>
#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);