Closed ghost closed 5 years ago
Entirely possible - but I really hate the 'just do a #define in a single C file' way of doing single libs to be honest.
I could probably move all the functions into the header and have them marked inline, I'll look into that.
Does #include "json.c"
not suffice?
@sheredom that is perfectly fine and it is not hard for me to just pack them into a single file. I was just curious what you think. My current build process is to have main.c and everything is a header file, so I actually prefer to #define when not using unity builds (stb libraries do the reverse). Saying no is important and I appreciate it.
Would it be possible to append the C file into the header file and wrap it in
#if !defined(SHEREDOM_JSON_HEADER)
to streamline unity builds? (or alternatively#if defined(SHEREDOM_JSON_IMPLEMENTATION)
; I prefer the first style in contrast to stb-style for unity builds, but the second may be less confusing for stb users)