From f0ff96df6ab8aeba3878ee7926bb88d5bf16efb4 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Mon, 13 Mar 2017 15:04:58 +0100 Subject: [PATCH] remove compatibility with Lua 5.0 --- src/lib_math.c | 4 ---- src/lib_string.c | 4 ---- src/luaconf.h | 4 ---- 3 files changed, 12 deletions(-) diff --git a/src/lib_math.c b/src/lib_math.c index 7bb03880..ef9dda2d 100644 --- a/src/lib_math.c +++ b/src/lib_math.c @@ -221,10 +221,6 @@ LUALIB_API int luaopen_math(lua_State *L) rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState)); rs->valid = 0; /* Use lazy initialization to save some time on startup. */ 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; } diff --git a/src/lib_string.c b/src/lib_string.c index c7f37bc7..76b0730a 100644 --- a/src/lib_string.c +++ b/src/lib_string.c @@ -737,10 +737,6 @@ LUALIB_API int luaopen_string(lua_State *L) GCtab *mt; global_State *g; 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); /* NOBARRIER: basemt is a GC root. */ g = G(L); diff --git a/src/luaconf.h b/src/luaconf.h index 87b052db..6486c003 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -92,10 +92,6 @@ #define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ #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). */ #if defined(luajit_c) #define LUA_PROGNAME "luajit" /* Fallback frontend name. */