aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02Reduce complexity of string writing functionsDavid Robillard1-77/+97
2023-12-02Reduce complexity of URI node writing functionsDavid Robillard1-21/+38
2023-12-02Reduce complexity of statement writing functionsDavid Robillard1-78/+174
2023-12-02Add empty syntax type for suppressing outputDavid Robillard3-11/+19
2023-12-02Use a simple type-safe stack in writerDavid Robillard4-49/+46
2023-12-02Add a set of limits to the worldDavid Robillard4-4/+25
The idea here is to remove the burden of passing things around like stack sizes (where most users don't care and will be happy with a reasonably large default) and keeping the call sites to things like serd_reader_new() clean. The cost is a bit more state, so it's both more powerful and more potentially flaky, since changing the limits has action at a distance that isn't clear from the call site. I think it's worth it for the cleaner API in the common case, and the much better forward compatibility.
2023-12-02Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard2-6/+6
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.
2023-12-02Add support for writing terse output with minimal newlinesDavid Robillard2-14/+46
2023-12-02Pass context flags to write_sep()David Robillard1-17/+20
2023-12-02Add initial flags to write contextDavid Robillard1-12/+17
2023-12-02Simplify statement flagsDavid Robillard3-39/+38
2023-12-02Replace multiple stream callbacks with SerdEventDavid Robillard5-52/+69
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.
2023-12-02Simplify writer style options and write UTF-8 by defaultDavid Robillard2-59/+21
2023-12-02Add SerdStatementDavid Robillard6-13/+201
2023-12-02Add SerdCaretDavid Robillard7-52/+163
2023-12-02Add SerdField to public APIDavid Robillard1-41/+33
A statement field enum was previously only used by the writer internally, but will be used in the public API (without a sentinel value) in following commits.
2023-12-02Add serd_world_get_blank()David Robillard2-2/+40
2023-12-02Remove serd_reader_set_default_graph()David Robillard2-23/+7
2023-12-02Use thread-safe strerror_r() if availableDavid Robillard5-7/+41
2023-12-02Move fopen wrapper to worldDavid Robillard5-27/+34
2023-12-02Move error handling to worldDavid Robillard5-30/+69
2023-12-02Add SerdWorld for shared library stateDavid Robillard7-37/+77
2023-12-02Add serd_node_compare()David Robillard2-0/+33
2023-12-02Clean up base64 node construction and access APIDavid Robillard1-0/+29
2023-12-02Clean up numeric node construction and access APIDavid Robillard3-14/+111
2023-12-02[WIP] Use exess for reading and writing numeric and binary literalsDavid Robillard4-275/+96
2023-12-02Move syntax name/extension utilities to public APIDavid Robillard2-50/+64
2023-12-02Improve reader error handlingDavid Robillard3-137/+167
2023-12-02Set flags directly when reading literal nodesDavid Robillard1-64/+43
2023-12-02Add debug checks for node paddingDavid Robillard2-13/+37
2023-12-02Zero node padding before passing to reader sinksDavid Robillard5-2/+41
2023-12-02Remove datatype and language from reader contextDavid Robillard2-40/+32
2023-12-02Simplify stack management by popping in bulk at higher levelsDavid Robillard4-139/+55
Since all memory used by the reader is POD in the stack, there is no benefit to forcing code to explicitly pop everything pushed to the stack, since any function can record an offset and pop back down to it regardless of what its callers pushed if it knows that it does not need those items. This is slightly more efficient (due to avoiding many pop calls), but also more resilient since "leaks" at deeper levels of recursion get nuked by some caller regardless of what was pushed. This should help prevent future regressions like f6437f606 (Fix memory consumption when reading documents).
2023-12-02Use a fixed-size reader stackDavid Robillard8-199/+273
2023-12-02Simplify reader interfaceDavid Robillard5-189/+106
2023-12-02Add SerdSink interface and hide implementationsDavid Robillard7-81/+179
2023-12-02Bring read/write interface closer to the C standardDavid Robillard8-57/+66
2023-12-02Add serd_new_boolean()David Robillard1-0/+8
2023-12-02Simplify literal construction APIDavid Robillard1-31/+61
2023-12-02Set datatypes on integer, decimal, and base64 nodesDavid Robillard1-30/+68
2023-12-02Simplify node construction APIDavid Robillard5-158/+171
2023-12-02Merge datatype/language into nodeDavid Robillard5-73/+171
This moves closer to the sord API, and is more convenient in most cases.
2023-12-02Simplify URI API and implementationDavid Robillard8-267/+259
2023-12-02Add serd_node_uri_view()David Robillard1-0/+12
2023-12-02Add serd_node_string_view()David Robillard1-0/+9
2023-12-02Align node allocationsDavid Robillard3-6/+46
2023-12-02Make nodes opaqueDavid Robillard9-315/+363
2023-12-02Add node accessor APIDavid Robillard1-0/+24
2023-12-02Shorten node constructor namesDavid Robillard3-29/+27
2023-12-02Rename string view fieldsDavid Robillard5-72/+72