-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Is your feature request related to a problem? Please describe.
i use macros for free malloc realloc etc and it overrides yyjson_alc.free
Describe the solution you'd like
rewrite free to something other than free
Describe alternatives you've considered
maybe _free or Free?
Additional context
Here is the compile errors:
In file included from /home/o/Personal/Code/CPI/include/json.h:7,
from /home/o/Personal/Code/CPI/src/main.c:1:
/home/o/Personal/Code/CPI/build/_deps/yyjson-src/src/yyjson.h: In function ‘yyjson_doc_free’:
/home/o/Personal/Code/CPI/build/_deps/yyjson-src/src/yyjson.h:5042:59: error: macro "free" passed 2 arguments, but takes just 1
5042 | if (doc->str_pool) alc.free(alc.ctx, doc->str_pool);
| ^
In file included from /home/o/Personal/Code/CPI/include/json.h:4:
/home/o/Personal/Code/CPI/include/debug.h:26: note: macro "free" defined here
26 | #define free(ptr) debug_Free (ptr, LINE, FILENAME)
|
/home/o/Personal/Code/CPI/build/_deps/yyjson-src/src/yyjson.h:5043:30: error: macro "free" passed 2 arguments, but takes just 1
5043 | alc.free(alc.ctx, doc);
| ^
/home/o/Personal/Code/CPI/include/debug.h:26: note: macro "free" defined here
26 | #define free(ptr) debug_Free (ptr, LINE, FILENAME)
|
make[2]: *** [CMakeFiles/main.dir/build.make:76: CMakeFiles/main.dir/src/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:971: CMakeFiles/main.dir/all] Error 2
make: *** [Makefile:136: all] Error 2