diff options
author | David Robillard <d@drobilla.net> | 2021-09-10 13:20:47 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | eb804125430e3445e85c423b28e1c41346772ed0 (patch) | |
tree | 532f6995ace537170fbbfde2d0d8226d1a48279b /test/test_read_chunk.c | |
parent | cbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae (diff) | |
download | serd-eb804125430e3445e85c423b28e1c41346772ed0.tar.gz serd-eb804125430e3445e85c423b28e1c41346772ed0.tar.bz2 serd-eb804125430e3445e85c423b28e1c41346772ed0.zip |
Make environments and sinks part of the world
Although functions/components that require minimal pre-existing state are nice,
these allocate memory and could potentially share resources. So, give them a
pointer to a world which can be used to configure such things. In particular,
this is working towards supporting custom allocators everywhere.
Diffstat (limited to 'test/test_read_chunk.c')
-rw-r--r-- | test/test_read_chunk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_read_chunk.c b/test/test_read_chunk.c index a956a07d..59f99910 100644 --- a/test/test_read_chunk.c +++ b/test/test_read_chunk.c @@ -92,7 +92,7 @@ int main(void) { SerdWorld* world = serd_world_new(); - SerdSink* sink = serd_sink_new(NULL, on_event, NULL); + SerdSink* sink = serd_sink_new(world, NULL, on_event, NULL); static const char* const string = "@prefix eg: <http://example.org/> .\n" "@base <http://example.org/base> .\n" @@ -104,7 +104,7 @@ main(void) "eg:s3 eg:p1 eg:o1 .\n" "eg:s4 eg:p1 [ eg:p3 eg:o1 ] .\n"; - SerdEnv* env = serd_env_new(SERD_EMPTY_STRING()); + SerdEnv* env = serd_env_new(world, SERD_EMPTY_STRING()); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0, env, sink, 4096); assert(reader); |