Closed warmwaffles closed 3 years ago
There is only two entry points utf8dup
and utf8ndup
that use malloc
- I think I'd rather add utf8dup_ex
that takes a user provided allocator to do this (similar to the user allocator in my other lib json.h
. Thoughts?
I think that would work too. Rationale is that I am using this library for some small stuff in an erlang NIF and would prefer to use erlang's allocator and deallocator there.
Would be nice to maybe provide a way for the person including the utf8 code to be able to do something like
I would make a PR to do this, but I don't know if it would be anything anyone is interested in.