From 2f0570aad62108e6e189ca827fc60c1e54ee96af Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 12 Jan 2020 10:01:20 -0600 Subject: [PATCH] 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. --- src/include/janet.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/janet.h b/src/include/janet.h index 820593b9..bc786446 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -1357,14 +1357,14 @@ JANET_API Janet janet_resolve_core(const char *name); /* Allow setting entry name for static libraries */ #ifndef JANET_ENTRY_NAME -#define JANET_ENTRY_NAME _janet_init -#endif - #define JANET_MODULE_ENTRY \ JANET_API JanetBuildConfig _janet_mod_config(void) { \ 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_panicv(Janet message);