aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2020-11-13Improve documentationDavid Robillard1-19/+36
2020-11-13Use line commentDavid Robillard1-3/+1
2020-11-13Improve documentation summary for SerdEnvDavid Robillard1-6/+1
2020-11-13Use line comments where appropriate and clean up headerDavid Robillard1-222/+115
2020-11-12Relax nullability annotation on allocation functionsDavid Robillard1-3/+5
In practice almost nobody checks for failed allocation, including unfortunately the serd tests and serdi itself. Adding a struct mode to conditionally define this would be a good idea to support allocation-hardened code, but for now just mark them as unspecified instead. On the bright side, this documents the nature of the returned pointers nicely.
2020-11-11Add nonnull and nullable attributes to APIDavid Robillard1-183/+214
This will warn if NULL is passed to any nonnull-annotated parameter, and is also supported by sanitizers which can check for violations at runtime. Unfortunately, it is currently only supported by clang. GCC has a similar feature in the nonnull attribute, but this has a different syntax (it's a function attribute) and is more dangerous since it is used by the optimizer to assume a null pointer is undefined behavior. This one just warns and still allows code to handle the situation gracefully, which I think is more appropriate for a library API. Note that this optimization behavior is not some unlikely edge case: switching these attributes to the GCC one will break release builds.
2020-11-10Add const, pure, and malloc function attributesDavid Robillard1-5/+16
2020-11-10Simplify visibility boilerplateDavid Robillard1-13/+6
2020-11-09Fix clang-tidy hicpp-signed-bitwise warnings in headerDavid Robillard2-16/+16
In exchange for suppressing a pointless superficial warning instead, but I dislike that convention since it looks confusing when hex digits are used and it's inconsistent with near-universal floating point suffix convention.
2020-11-09Check headers with stricter clang-tidy settingsDavid Robillard1-0/+7
2020-11-09Move header to conventional include directoryDavid Robillard1-0/+1098