summaryrefslogtreecommitdiffstats
path: root/src/btree.c
AgeCommit message (Collapse)AuthorFilesLines
2023-09-21Avoid type conversionsDavid Robillard1-42/+41
Rework arithmetic slightly to avoid some type conversions, and warnings with clang-tidy 16.0.6. Also consistently use explicitly unsigned literals where appropriate to minimize unsigned/signed conversions in general.
2022-11-02Remove function_types.hDavid Robillard1-35/+35
2022-10-21Split up common headerDavid Robillard1-26/+26
2022-10-09Fix off-by-one error in assertionDavid Robillard1-1/+1
2022-06-28Use uppercase integer literal suffixesDavid Robillard1-49/+49
I give in.
2021-09-14Add aligned allocation interface and use it in ZixBTreeDavid Robillard1-9/+17
2021-09-14Make ZixAllocator a single flat structDavid Robillard1-13/+13
I can never decide between these two patterns for polymorphic objects in C, but this one seems more appropriate here since it's more conducive to inheritance.
2021-09-11Fix zix_btree_lower_bound()David Robillard1-7/+8
This condition was converted to an assertion in an over-eager session of code simplification and coverage testing. It turns out this does happen.
2021-09-10Fix C11 buildDavid Robillard1-3/+6
2021-09-10Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
2021-09-10Add custom allocator supportDavid Robillard1-26/+34
2021-09-10Add nullability annotationsDavid Robillard1-0/+17
This allows clang to issue warnings at compile time when null is passed to a non-null parameter. For public entry points, also add assertions to catch such issues when the compiler does not support this.
2021-09-10Add a user handle to destroy callbackDavid Robillard1-10/+16
2021-09-10Simplify BTree implementationDavid Robillard1-253/+388
2021-09-10Allow ZixBTreeIter to be allocated on the stackDavid Robillard1-170/+104
2021-09-10Remove destroy field of BTree and add zix_btree_clear()David Robillard1-29/+36
If this is used, it is only when clearing or freeing a tree. Allowing it to be given as a parameter directly there is clearer and avoids bloating the tree itself with information that isn't needed.
2021-09-10Remove BTree debug printingDavid Robillard1-37/+0
2021-09-10Avoid implicit padding in BTree nodes on 64-bitDavid Robillard1-8/+15
Might as well use 32-bit integers if the space is there anyway.
2021-09-10Be explicit about the sign of defined integer constantsDavid Robillard1-4/+4
2021-09-10Fix conversion warningsDavid Robillard1-1/+1
2021-07-17Use line comments where appropriateDavid Robillard1-11/+11
2021-06-30Add pure attribute to internal BTree accessor functionsDavid Robillard1-0/+3
2021-01-12Fix crash with optimized builds with GCC 10.1.0David Robillard1-1/+1
2020-12-31Update copyright headersDavid Robillard1-1/+1
2020-12-31Remove ZIX_PRIVATE and ZIX_INLINE mechanismsDavid Robillard1-42/+21
A normal C library ought to be good enough for anybody.
2020-12-31Separate source from headersDavid Robillard1-0/+957