Skip to content

Commit

Permalink
Remove Lua 5.0 compatibility defines.
Browse files Browse the repository at this point in the history
Suggested by François Perrad.
  • Loading branch information
Mike Pall committed Mar 17, 2017
1 parent d3e36e7 commit de5568e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/lib_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

4 changes: 0 additions & 4 deletions src/lib_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions src/luaconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit de5568e

Please sign in to comment.