- Arrays
- Use tests to find problems
- Reimplement utf8 and str
- Get list.h and dlist.h up to par
-
Find all
+
instances and wrap incheck_overflow
or something -
Find all
-
instances that are pointer arithmetic, and replace it withpositive_ptrdiff
-
byte_len -> len in utf8
-
Many
string_*
functions need fast variants based on their utf8 counterparts -
Expand
utf8_pop_*
topop_left
andpop_right
- Build on this to
string_pop_*
topop_left
andpop_right
- Build on this to
-
Add
cstr
functions to str.h -
All
*_assign
functions should take ownership of their arguments- n.b. this doesn't make sense for slices
- n.b. 2
*_assign
for data and arrays is in*_slice*.h
-
Ensure everything modifies their output parameters only on success
-
Build checked 64-bit math functions that don't require 128-bits of precision
- tables might benefit from having a local hasher?
- Parameterize string encoding
- Not super clear on how to do this
- Consider adding an allocation size strategy for functions that auto-resize,
i.e.
*_encode
or even*_append_*
. Currently it's "always double" which almost certainly non-optimal. - Iterators
*_free
functions need an accompanying*_zero_free
that zeros the data before freeing it. OpenBSD providesfreezero
andrecallocarray
for this kind of thing and should maybe be used if found;recallocarray
is tricky though.- Switch table to https://github.com/martinus/robin-hood-hashing
- Function attributes:
- GCC:
malloc
- GCC:
nonnull
- GCC:
access
- GCC:
assume_aligned
- GCC:
returns_nonnull
- GCC:
warn_unused_result
- GCC:
fallthrough
- GCC:
- Other libs:
- GLib
- APR
- hash table libraries
- Look at https://github.com/attractivechaos/klib/
- uthash
- sds
- libcperciva
- Fraggle's C algorithms
- tommyds
- C++ STL
- Ludocode's Pottery
- Log
- Charset
I think this will be hard because of the preprocessor-ness of things. But
current fave tool is cldoc
.
- cbase-path/file/stream
- Break this out
- cbase-mpfr
- cbase-gmp
- cbase-event
- cbase-json
- cbase-regex
- cbase-msgpack