diff options
author | David Robillard <d@drobilla.net> | 2021-07-11 20:47:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 6eb1fa15a06ab7de08e33add1540a45b83c5f0d8 (patch) | |
tree | 86d3cfedbf2ff76878eba6d14dc7fc259d1cbf46 /src/world.c | |
parent | d1ba721d37af61f2b529faaa16bd20ba1e161b06 (diff) | |
download | serd-6eb1fa15a06ab7de08e33add1540a45b83c5f0d8.tar.gz serd-6eb1fa15a06ab7de08e33add1540a45b83c5f0d8.tar.bz2 serd-6eb1fa15a06ab7de08e33add1540a45b83c5f0d8.zip |
Add SerdWorld for shared library state
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/world.c b/src/world.c new file mode 100644 index 00000000..eef70a14 --- /dev/null +++ b/src/world.c @@ -0,0 +1,29 @@ +// Copyright 2011-2022 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#include "world.h" + +#include "serd/world.h" + +#include <stdlib.h> + +SerdWorld* +serd_world_new(void) +{ + return (SerdWorld*)calloc(1, sizeof(SerdWorld)); +} + +void +serd_world_free(SerdWorld* const world) +{ + free(world); +} + +void +serd_world_set_error_func(SerdWorld* world, + SerdErrorFunc error_func, + void* handle) +{ + world->error_func = error_func; + world->error_handle = handle; +} |