diff options
| -rw-r--r-- | src/lib_math.c | 4 | ||||
| -rw-r--r-- | src/lib_string.c | 4 | ||||
| -rw-r--r-- | src/luaconf.h | 4 |
3 files changed, 0 insertions, 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) | |||
| 221 | rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState)); | 221 | rs = (RandomState *)lua_newuserdata(L, sizeof(RandomState)); |
| 222 | rs->valid = 0; /* Use lazy initialization to save some time on startup. */ | 222 | rs->valid = 0; /* Use lazy initialization to save some time on startup. */ |
| 223 | LJ_LIB_REG(L, LUA_MATHLIBNAME, math); | 223 | LJ_LIB_REG(L, LUA_MATHLIBNAME, math); |
| 224 | #if defined(LUA_COMPAT_MOD) && !LJ_52 | ||
| 225 | lua_getfield(L, -1, "fmod"); | ||
| 226 | lua_setfield(L, -2, "mod"); | ||
| 227 | #endif | ||
| 228 | return 1; | 224 | return 1; |
| 229 | } | 225 | } |
| 230 | 226 | ||
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) | |||
| 737 | GCtab *mt; | 737 | GCtab *mt; |
| 738 | global_State *g; | 738 | global_State *g; |
| 739 | LJ_LIB_REG(L, LUA_STRLIBNAME, string); | 739 | LJ_LIB_REG(L, LUA_STRLIBNAME, string); |
| 740 | #if defined(LUA_COMPAT_GFIND) && !LJ_52 | ||
| 741 | lua_getfield(L, -1, "gmatch"); | ||
| 742 | lua_setfield(L, -2, "gfind"); | ||
| 743 | #endif | ||
| 744 | mt = lj_tab_new(L, 0, 1); | 740 | mt = lj_tab_new(L, 0, 1); |
| 745 | /* NOBARRIER: basemt is a GC root. */ | 741 | /* NOBARRIER: basemt is a GC root. */ |
| 746 | g = G(L); | 742 | 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 @@ | |||
| 92 | #define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ | 92 | #define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ |
| 93 | #define LUA_MAXCAPTURES 32 /* Max. pattern captures. */ | 93 | #define LUA_MAXCAPTURES 32 /* Max. pattern captures. */ |
| 94 | 94 | ||
| 95 | /* Compatibility with older library function names. */ | ||
| 96 | #define LUA_COMPAT_MOD /* OLD: math.mod, NEW: math.fmod */ | ||
| 97 | #define LUA_COMPAT_GFIND /* OLD: string.gfind, NEW: string.gmatch */ | ||
| 98 | |||
| 99 | /* Configuration for the frontend (the luajit executable). */ | 95 | /* Configuration for the frontend (the luajit executable). */ |
| 100 | #if defined(luajit_c) | 96 | #if defined(luajit_c) |
| 101 | #define LUA_PROGNAME "luajit" /* Fallback frontend name. */ | 97 | #define LUA_PROGNAME "luajit" /* Fallback frontend name. */ |
