Closed nordlow closed 1 week ago
No part of the public API should be marked as inline, what are you trying to wrap?
Maybe you could try this:
// create a new file, e.g. yyjson_ext.c
#define yyjson_api_inline yyjson_api
#include yyjson.h
Search for yyjson_api_inline
in yyjson.h
.
I suggest changing
#ifndef yyjson_api_inline
# define yyjson_api_inline static yyjson_inline
#endif
to
#ifndef yyjson_api_inline
# define yyjson_api_inline yyjson_inline
#endif
in yyjson.h
. Shall I create a PR that does this?
@nordlow No, the static
keyword is used to limit the scope of these functions to the current source file. If we simply remove static
and make these functions inline, it could potentially lead to naming collisions and linker errors in some environments.
I'm currently developing a wrapper for yyjson in D.
However the inline qualifier macro(s) on some API functions prevents them from being callable as an extern(C) functions. Would it possible to remove the static qualifer part in those macros?