textstore#
A data structure for storing reference-counted, de-duplicated strings for access by other structures.
- Added some notes
- Used calloc where possible, added a memset after a realloc where not.
- fixed and off-by-one bug
- swapped strcmp for memcmp (why was I using strcmp???)
- Probably missed other bugs present in the library.
Signed-off-by: Jeremia Dominguez <me@jeremia.dev>
Also redid the Makefile to better mirror the xmake.lua file.
I was under some misconception about pointer alignment, after some work
on the Zig version of this code. Apparently, I was probably doing
something else wrong in that code, because not aligning the pointers seems to work just fine.
Anyways, making this change allows the requirements to relax to C99.
A data structure for storing reference-counted, de-duplicated strings for access by other structures.