I encountered a naming conflict when testing QuickJS as a dynamic library with Criterion.
Criterion side
|
CR_API void *cr_realloc(void *ptr, size_t size); |
QuickJS side https://github.com/bellard/quickjs/blob/c73a435f365e5250dd529cde00675528d7609edf/libunicode.h#L53
int cr_realloc(CharRange *cr, int size);
Somehow, the quickjs internal invokes the Criterion cr_realloc function instead of its own one, and causes allocation failure.
I wonder if there is a recommended way to avoid this conflict when using Criterion with libraries that have functions named cr_*?
I encountered a naming conflict when testing QuickJS as a dynamic library with Criterion.
Criterion side
Criterion/include/criterion/alloc.h
Line 86 in f6d40d5
QuickJS side https://github.com/bellard/quickjs/blob/c73a435f365e5250dd529cde00675528d7609edf/libunicode.h#L53
Somehow, the quickjs internal invokes the Criterion
cr_reallocfunction instead of its own one, and causes allocation failure.I wonder if there is a recommended way to avoid this conflict when using Criterion with libraries that have functions named cr_*?