diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
commit | 21df26984da91143c15587f5a03c98d68c3adc4e (patch) | |
tree | aaa707a628ad331f67890023dffe1b4f60dd01d3 /lib/lua/src/luaconf.h | |
parent | b09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff) | |
parent | eabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff) | |
download | dragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'lib/lua/src/luaconf.h')
-rw-r--r-- | lib/lua/src/luaconf.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/lua/src/luaconf.h b/lib/lua/src/luaconf.h index e2cb26163..1521f0cbc 100644 --- a/lib/lua/src/luaconf.h +++ b/lib/lua/src/luaconf.h @@ -143,6 +143,14 @@ #define LUA_INTEGER ptrdiff_t +/* MINETEST-SPECIFIC CHANGE: make sure API functions conform to the C ABI. */ +#if defined(__cplusplus) +#define LUAI_API_EXTERN extern "C" +#else +#define LUAI_API_EXTERN extern +#endif + + /* @@ LUA_API is a mark for all core API functions. @@ LUALIB_API is a mark for all standard library functions. @@ -154,14 +162,14 @@ #if defined(LUA_BUILD_AS_DLL) #if defined(LUA_CORE) || defined(LUA_LIB) -#define LUA_API __declspec(dllexport) +#define LUA_API LUAI_API_EXTERN __declspec(dllexport) #else -#define LUA_API __declspec(dllimport) +#define LUA_API LUAI_API_EXTERN __declspec(dllimport) #endif #else -#define LUA_API extern +#define LUA_API LUAI_API_EXTERN #endif |