mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Disable LUA_COMPAT_GFIND and LUA_COMPAT_MOD in Lua 5.2 mode.
This commit is contained in:
parent
16d8c83743
commit
2d3c1967c7
@ -209,7 +209,7 @@ LUALIB_API int luaopen_math(lua_State *L)
|
|||||||
rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState));
|
rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState));
|
||||||
rs->valid = 0; /* Use lazy initialization to save some time on startup. */
|
rs->valid = 0; /* Use lazy initialization to save some time on startup. */
|
||||||
LJ_LIB_REG(L, LUA_MATHLIBNAME, math);
|
LJ_LIB_REG(L, LUA_MATHLIBNAME, math);
|
||||||
#if defined(LUA_COMPAT_MOD)
|
#if defined(LUA_COMPAT_MOD) && !LJ_52
|
||||||
lua_getfield(L, -1, "fmod");
|
lua_getfield(L, -1, "fmod");
|
||||||
lua_setfield(L, -2, "mod");
|
lua_setfield(L, -2, "mod");
|
||||||
#endif
|
#endif
|
||||||
|
@ -857,7 +857,7 @@ LUALIB_API int luaopen_string(lua_State *L)
|
|||||||
GCtab *mt;
|
GCtab *mt;
|
||||||
global_State *g;
|
global_State *g;
|
||||||
LJ_LIB_REG(L, LUA_STRLIBNAME, string);
|
LJ_LIB_REG(L, LUA_STRLIBNAME, string);
|
||||||
#if defined(LUA_COMPAT_GFIND)
|
#if defined(LUA_COMPAT_GFIND) && !LJ_52
|
||||||
lua_getfield(L, -1, "gmatch");
|
lua_getfield(L, -1, "gmatch");
|
||||||
lua_setfield(L, -2, "gfind");
|
lua_setfield(L, -2, "gfind");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user