--- a/src/string.c Thu May 15 16:02:54 2025 +0200 +++ b/src/string.c Thu May 15 16:12:09 2025 +0200 @@ -65,7 +65,7 @@ void cx_strfree(cxmutstr *str) { if (str == NULL) return; - cxFree(cxDefaultAllocator, str->ptr); + cxFreeDefault(str->ptr); str->ptr = NULL; str->length = 0; } @@ -287,7 +287,7 @@ // if the pattern exceeds static prefix table, allocate on the heap const bool useheap = needle.length >= CX_STRSTR_SBO_SIZE; register size_t *ptable = useheap - ? cxCalloc(cxDefaultAllocator, needle.length + 1, sizeof(size_t)) + ? cxCallocDefault(needle.length + 1, sizeof(size_t)) : s_prefix_table; // keep counter in registers @@ -326,7 +326,7 @@ // if prefix table was allocated on the heap, free it if (useheap) { - cxFree(cxDefaultAllocator, ptable); + cxFreeDefault(ptable); } return result;