aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Add support for xsd:hexBinary literalsDavid Robillard1-26/+93
2022-01-28Consolidate number support into a single "value" APIDavid Robillard1-141/+168
2022-01-28Remove datatype arguments from integer and base64 constructorsDavid Robillard1-33/+20
2022-01-28Add custom allocator supportDavid Robillard1-51/+74
2022-01-28Use more human-readable status codesDavid Robillard1-17/+16
2022-01-28Add assertions for all non-null pointers in the public APIDavid Robillard1-2/+24
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-14Expose low-level node construction APIDavid Robillard1-212/+448
2022-01-14Remove serd_new_resolved_uri()David Robillard1-36/+0
2022-01-14Rename serd_new_simple_node() to serd_new_token()David Robillard1-7/+3
Things get confusing without a term for this concept (which is roughly "nodes that are not annoying to construct"), so "token" it is.
2022-01-14Preserve long or short quoting from input documentsDavid Robillard1-66/+75
2022-01-14Factor out serd_write_file_uri()David Robillard1-70/+2
2022-01-14Add serd_node_compare()David Robillard1-0/+27
2022-01-14Remove SERD_CURIE node datatype entirelyDavid Robillard1-9/+2
2022-01-13Add support for parsing variablesDavid Robillard1-1/+2
This adds a reader flag and serdi option for extending a syntax with support for SPARQL-like variables, for storing things like patterns or simple queries.
2022-01-13Make serd_uri_string_length() precise and add it to public APIDavid Robillard1-21/+6
2022-01-13Be precise about the meaning of node "length" and "size"David Robillard1-28/+22
2022-01-13Split up serd_internal.hDavid Robillard1-1/+1
2022-01-13Simplify writer style optionsDavid Robillard1-1/+1
2022-01-13Add SerdNodes for storing a cache of interned nodesDavid Robillard1-1/+0
2022-01-13Clean up base64 node construction and access APIDavid Robillard1-0/+27
2022-01-13Clean up numeric node construction and access APIDavid Robillard1-0/+104
2022-01-13Add serd_new_boolean()David Robillard1-0/+7
2022-01-13Use exess for reading and writing numeric and binary literalsDavid Robillard1-110/+78
2022-01-13Simplify literal construction APIDavid Robillard1-32/+62
2022-01-13Add debug checks for node paddingDavid Robillard1-8/+32
2022-01-13Zero node padding before passing to reader sinksDavid Robillard1-1/+29
2022-01-13Use a fixed-size reader stackDavid Robillard1-2/+0
2022-01-13Bring read/write interface closer to C standardDavid Robillard1-9/+11
2022-01-13Set datatypes on integer, decimal, and base64 nodesDavid Robillard1-27/+51
2022-01-13Simplify node construction APIDavid Robillard1-66/+86
2022-01-13Merge datatype/language into nodeDavid Robillard1-5/+114
This moves closer to the sord API, and is more convenient in most cases.
2022-01-13Simplify URI API and implementationDavid Robillard1-73/+47
2022-01-13Add serd_node_uri_view()David Robillard1-0/+12
2022-01-13Add serd_node_string_view()David Robillard1-0/+8
2022-01-13Align node allocationsDavid Robillard1-11/+35
2022-01-13Make nodes opaqueDavid Robillard1-76/+104
2022-01-13Add node accessor APIDavid Robillard1-0/+24
2022-01-13Shorten node constructor namesDavid Robillard1-24/+22
2022-01-13Rename SerdType to SerdNodeTypeDavid Robillard1-4/+4
The old name will be even more ambiguous with the increased scope.
2022-01-13Rename SerdURI to SerdURIViewDavid Robillard1-19/+19
2022-01-13Use char* for strings in public APIDavid Robillard1-30/+29
The constant casting just makes user code a mess, for no benefit.
2022-01-13Add SerdBuffer type for mutable buffersDavid Robillard1-9/+9
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2022-01-13Remove escape parameter from serd_node_new_file_uriDavid Robillard1-3/+2
Since characters are escaped because they are not valid characters in a URI, any use of this function without escaping is problematic at best.
2022-01-13Remove useless character countingDavid Robillard1-22/+14
2021-06-30Move local URI utility functionsDavid Robillard1-28/+28
2021-05-31Make most function parameters constDavid Robillard1-26/+32
More const never hurts in general, but in particular this allows the compiler to make better nullability deductions, which reduces the amount of manual nullability casting required.
2021-05-31Remove "static inline" for functions in implementation filesDavid Robillard1-2/+2
This is just noise since these are static functions local to a C compilation unit.
2021-05-31Clean up switch case commentsDavid Robillard1-5/+5
2021-01-10Avoid use of strcpyDavid Robillard1-3/+3
Again, really just skirting around warnings here, but this is faster anyway since we know what we're doing here and doing require any fine-grained null termination.
2021-01-09Avoid GCC warning about printed string overflowDavid Robillard1-9/+14
GCC seems to think there was a potential overflow here, but I don't see it. I think it just can't figure out that the printed text and the size both depend on the same variable. In any case, avoiding formatting functions here avoids the warning, and is probably faster anyway.