mirror of
https://github.com/janet-lang/janet
synced 2025-05-22 17:24:11 +00:00
Address #249
If JANET_ENTRY_NAME is defined, we are compiling into a single binary. In this case, we don't want to define the config symbol multiple times with same name, as this causes the linker error.
This commit is contained in:
parent
3d40c95e80
commit
2f0570aad6
@ -1357,14 +1357,14 @@ JANET_API Janet janet_resolve_core(const char *name);
|
|||||||
|
|
||||||
/* Allow setting entry name for static libraries */
|
/* Allow setting entry name for static libraries */
|
||||||
#ifndef JANET_ENTRY_NAME
|
#ifndef JANET_ENTRY_NAME
|
||||||
#define JANET_ENTRY_NAME _janet_init
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define JANET_MODULE_ENTRY \
|
#define JANET_MODULE_ENTRY \
|
||||||
JANET_API JanetBuildConfig _janet_mod_config(void) { \
|
JANET_API JanetBuildConfig _janet_mod_config(void) { \
|
||||||
return janet_config_current(); \
|
return janet_config_current(); \
|
||||||
} \
|
} \
|
||||||
JANET_API void JANET_ENTRY_NAME
|
JANET_API void _janet_init
|
||||||
|
#else
|
||||||
|
#define JANET_MODULE_ENTRY JANET_API void JANET_ENTRY_NAME
|
||||||
|
#endif
|
||||||
|
|
||||||
JANET_NO_RETURN JANET_API void janet_signalv(JanetSignal signal, Janet message);
|
JANET_NO_RETURN JANET_API void janet_signalv(JanetSignal signal, Janet message);
|
||||||
JANET_NO_RETURN JANET_API void janet_panicv(Janet message);
|
JANET_NO_RETURN JANET_API void janet_panicv(Janet message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user