Skip to content

Commit

Permalink
make distinction between juajit 2.1 and 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
myQwil committed Mar 13, 2022
1 parent 94791d1 commit 30b23b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#if LUA_VERSION_NUM == 501

#define lua_rawlen(L,i) lua_objlen(L,(i))

#if LUAJIT_VERSION_NUM < 20100

#define luaL_setmetatable(L,n) (luaL_getmetatable(L,(n)) ,lua_setmetatable(L,-2))
#define LUAL_NUMSIZES (sizeof(lua_Integer)*16 + sizeof(lua_Number))
#define UNUSED(x) ((void)(x))
Expand Down Expand Up @@ -47,7 +50,8 @@ LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
lua_pop(L, nup); /* remove upvalues */
}

#endif
#endif // LUAJIT_VERSION_NUM
#endif // LUA_VERSION_NUM

using namespace std;
using namespace pd;
Expand Down

0 comments on commit 30b23b4

Please sign in to comment.