aboutsummaryrefslogtreecommitdiffstats
path: root/src/sink.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Add custom allocator supportDavid Robillard1-6/+10
2022-01-28Make environments and sinks part of the worldDavid Robillard1-3/+6
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.
2022-01-28Add assertions for all non-null pointers in the public APIDavid Robillard1-0/+16
Clang issues warnings at build time based on the SERD_NONNULL annotations, which is a much better approach in general. However, it does not cover cases where the API is being used with another compiler, or without a compiler that can statically check things at all (such as Python or other dynamic language bindings). In those situations, getting a clear assertion message is a lot less confusing than a random crash somewhere in serd, and it makes it clear that the bug is in the caller, so I think it's worth the tedious verbosity.
2022-01-13Replace multiple stream callbacks with SerdEventDavid Robillard1-30/+23
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2022-01-13Add SerdStatementDavid Robillard1-4/+13
2022-01-13Add SerdSink interface and hide implementationsDavid Robillard1-0/+112
2011-12-12Make bulk writer internal and inlinable to avoid function call overhead in ↵David Robillard1-83/+0
the writer. git-svn-id: http://svn.drobilla.net/serd/trunk@254 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Move all #ifdef gunk to serd_internal.h.David Robillard1-9/+2
Centralise file open and buffer allocation to localize platform tweaks. git-svn-id: http://svn.drobilla.net/serd/trunk@244 490d8e77-9747-427b-9fa3-0b8f29cee8a0
2011-12-11Add SerdBulkSink for writing bulk output and corresponding serdi -B option.David Robillard1-0/+90
git-svn-id: http://svn.drobilla.net/serd/trunk@242 490d8e77-9747-427b-9fa3-0b8f29cee8a0