mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
remove compatibility with Lua 5.0
This commit is contained in:
parent
d3e36e7920
commit
f0ff96df6a
@ -221,10 +221,6 @@ 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) && !LJ_52
|
|
||||||
lua_getfield(L, -1, "fmod");
|
|
||||||
lua_setfield(L, -2, "mod");
|
|
||||||
#endif
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -737,10 +737,6 @@ 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) && !LJ_52
|
|
||||||
lua_getfield(L, -1, "gmatch");
|
|
||||||
lua_setfield(L, -2, "gfind");
|
|
||||||
#endif
|
|
||||||
mt = lj_tab_new(L, 0, 1);
|
mt = lj_tab_new(L, 0, 1);
|
||||||
/* NOBARRIER: basemt is a GC root. */
|
/* NOBARRIER: basemt is a GC root. */
|
||||||
g = G(L);
|
g = G(L);
|
||||||
|
@ -92,10 +92,6 @@
|
|||||||
#define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */
|
#define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */
|
||||||
#define LUA_MAXCAPTURES 32 /* Max. pattern captures. */
|
#define LUA_MAXCAPTURES 32 /* Max. pattern captures. */
|
||||||
|
|
||||||
/* Compatibility with older library function names. */
|
|
||||||
#define LUA_COMPAT_MOD /* OLD: math.mod, NEW: math.fmod */
|
|
||||||
#define LUA_COMPAT_GFIND /* OLD: string.gfind, NEW: string.gmatch */
|
|
||||||
|
|
||||||
/* Configuration for the frontend (the luajit executable). */
|
/* Configuration for the frontend (the luajit executable). */
|
||||||
#if defined(luajit_c)
|
#if defined(luajit_c)
|
||||||
#define LUA_PROGNAME "luajit" /* Fallback frontend name. */
|
#define LUA_PROGNAME "luajit" /* Fallback frontend name. */
|
||||||
|
Loading…
Reference in New Issue
Block a user