mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Fix static linking problem with LuaJIT
LuaJIT and LuaSocket both define new Lua APIs from Lua 5.2 (in particular `luaL_setfuncs` and `luaL_testudata`). When linking both statically, the one definition rule strikes and linking fails. This commit fixes the issue by renaming the LuaSocket versions of those functions behind the scenes using the C preprocessor. Closes #214
This commit is contained in:
parent
144fa01c2f
commit
59c8aaac34
@ -5,6 +5,8 @@
|
||||
#include "lauxlib.h"
|
||||
|
||||
#if LUA_VERSION_NUM==501
|
||||
#define luaL_setfuncs socket_setfuncs
|
||||
#define luaL_testudata socket_testudata
|
||||
void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
|
||||
void *luaL_testudata ( lua_State *L, int arg, const char *tname);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user