33 Commits

Author SHA1 Message Date
973302fb31 Fix GCC errors 2025-12-23 14:11:06 +01:00
bc4a8918e2 Add string functions 2025-12-23 14:11:06 +01:00
8b29a707ab Fix guf_id_pool integer portability 2025-12-23 14:11:06 +01:00
dfd2f0e4da Fix guf_str uninit 2025-12-23 14:11:06 +01:00
6bf47f0ca6 Refactor to use portable minimum-width integers.
The signed and unsigned fixed-width integers (int32_t, uint32_t etc.) are optional
in C99 (and above). Use the non-optional minimum-width integers (int_fast32_t, uint_fast32_t and int_least32_t, uint_least32_t etc.) instead.

To simulate unsigned wrap-around, use the GUF_UWRAP macros in guf_common.h

cf. https://en.cppreference.com/w/c/types/integer (last-retrieved: 2025-05-18)
2025-12-23 14:11:06 +01:00
fad608e2ed Fix failed assertion in guf_str_copy
An assertion GUF_ASSERT(str_is_valid(dst)) failed in guf_str_copy when it called guf_str_cstr(dst)
 since guf_str_cstr assumes an already valid string, which was not the case when src was a short string.

Therefore, we get the dst's c_str now without calling guf_str_cstr(dst)

(Found by writing DbufStrTest.)
2025-12-23 14:11:06 +01:00
e3b18473f9 Add guf_math_ckdint IMPL_STATIC etc. 2025-12-23 14:11:05 +01:00
4111f54159 Add checked arithmetic 2025-12-23 14:11:05 +01:00
936a9dac56 Re-implement guf_str tokeniser 2025-12-23 14:11:05 +01:00
9b66649e01 Add guf_str hash functions 2025-12-23 14:11:05 +01:00
e923775769 Fix guf_str bugs and add tests 2025-12-23 14:11:05 +01:00
4a231dc58f Add guf_str_substr 2025-12-23 14:11:05 +01:00
b1a5094d2b Add more dict functions 2025-12-23 14:11:05 +01:00
ce4b25318d Add comments 2025-12-23 14:11:05 +01:00
b541100a76 Change directory structure 2025-12-23 14:11:05 +01:00
0376fd3e99 Add more guf_str functions 2025-12-23 14:11:05 +01:00
eed418e6cd Add changeable load factor 2025-12-23 14:11:05 +01:00
8b696b31fc Add move- and copy ctors to dict and guf_str 2025-12-23 14:11:05 +01:00
e1bc585f68 Use SIZE_MAX instead of SIZE_T_MAX 2025-12-23 14:11:05 +01:00
c8ffde8c19 Fix warnings in release 2025-12-23 14:11:05 +01:00
81ab99ff15 Implement guf_str 2025-12-23 14:11:05 +01:00
517151b342 Change short-string approach to use 32 instead of 40 bytes 2025-12-23 14:11:05 +01:00
ac9fa9f9ce Add quaternion operations 2025-12-23 14:11:05 +01:00
d9114104c6 Add guf_str_view functions 2025-12-23 14:11:04 +01:00
f942cd8160 Add GUF_CSTR_TO_VIEW_CPP 2025-12-23 14:11:04 +01:00
6bed0d7616 Fix guf_dict growth bug 2025-12-23 14:11:04 +01:00
467f9be00a Refactor 2025-12-23 14:11:04 +01:00
947041838e Add tokeniser 2025-12-23 14:11:04 +01:00
d59d29f9f1 Add utf-8 handling 2025-12-23 14:11:04 +01:00
42f6a4e20d Major refactor 2025-12-23 14:11:04 +01:00
6addd12dcd Rewrite dbuf 2025-12-23 14:11:04 +01:00
44ee8494d7 Use macro templates instead of void pointers 2025-12-23 14:11:04 +01:00
jun
0751726fc5 Initial commit 2025-01-03 10:38:57 +01:00