Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
|
|
|
|
This makes the paging mechanism an internal detail once again. While it's
conceptually elegant to simply have a single write interface and have the block
dumper just be another implementation of that, unfortunately it is not
practical. The inlining of serd_block_dumper_write() is a significant
performance boost, because it avoids a non-inlinable function call of overhead
per character.
Compared to the SerdByteSink approach, this removes the burden and overhead of
needing to dynamically allocate the structure itself.
|
|
Essentially replaces serd_buffer_sink_finish() with serd_buffer_close(), which
makes writing to a buffer consistent with writing to a file or anything else.
|
|
This simplifies everything by replacing special cases with a more general close
function. A type is no longer stored in the structure, so the other
constructors are now essentially syntactic sugar for the universal
serd_byte_sink_new_function().
|
|
|
|
|
|
|
|
This expands relative and prefixed URIs in the reader on the stack, rather than
passing them to the caller to be dealt with. This pushes these context-full
forms to the edge of the system as much as possible to minimise the headaches
they can cause.
Towards having stricter guarantees about nodes and eliminating the CURIE node
type altogether.
|
|
Writing having side-effects seems questionable in general, and this prepares
things for expanding URIs in the reader.
|
|
|
|
|
|
The unset value for flags should represent the best default, which in this case
is strict parsing. Lax parsing is the riskier opt-in option.
|
|
|
|
This removes the obligation from the caller to correctly maintain flags to
describe the current anonymous context, instead making the writer handle this
itself as much as possible. Flags remain for the cases the writer can not
infer from context: the start of anonymous subject and object nodes.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This moves closer to the sord API, and is more convenient in most cases.
|
|
|
|
|
|
The constant casting just makes user code a mess, for no benefit.
|
|
This avoids const violations from abusing SerdChunk as a mutable buffer
for string sinks.
|
|
|
|
|
|
|