Closed DeanoC closed 2 years ago
That's seems reasonable, I'll add that!
@DeanoC sorry for taking so long - I've had my head up my arse! I decided to not rely on assert.h
, and just return NULL
if you try use the malloc
path with UTF8_NO_STD_MALLOC
defined. Fixed in #104!
At the moment, we can pass alloc_func_ptr into functions that need to allocate memory but the malloc path is still live and for bare metal platforms that don't have an actual malloc in the c lib is won't compile, would be nice if a define could remove the malloc call completely... Happy to fail if no malloc, I'll always be passing alloc_func_ptr.
For now I've just defined it out like so
if UTF8_NO_STD_MALLOC
//No malloc, you must pass in alloc_func_ptr assert(false);
else
endif