[Tarantool-patches] [PATCH 3/3] misc: fix linking when LUA_BUILD_AS_DLL is defined
Sergey Kaplun
skaplun at tarantool.org
Fri Oct 16 18:26:34 MSK 2020
For become symbols exportable at several building systems (namely mvsc,
xedk, xb1) LuaJIT defines LUA_BUILD_AS_DLL at corresponding bat files.
When this macro is defined, the definition of LUA_API macro depends on
LUA_CORE and LUA_LIB macros (see luaconf.h). If defined(LUA_CORE) or
defined(LUA_LIB) then LUA_API macro is defined as
__declspec(dllexport). Otherwise, it defined as __declspec(dllimport).
This patch adds definition of LUA_CORE macro at the top of lj_mapi.c
file to make corresponding symbols exportable for systems described
above.
Follows up tarantool/tarantool#5187
---
src/lj_mapi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lj_mapi.c b/src/lj_mapi.c
index 13737e0..b2b35a1 100644
--- a/src/lj_mapi.c
+++ b/src/lj_mapi.c
@@ -5,6 +5,9 @@
** Copyright (C) 2015-2019 IPONWEB Ltd.
*/
+#define lj_mapi_c
+#define LUA_CORE
+
#include "lua.h"
#include "lmisclib.h"
--
2.28.0
More information about the Tarantool-patches
mailing list