From 3a86e1f2fde002199fff0ca4bb2ed4674b32ec8e Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 4 Jun 2024 09:21:15 +0200 Subject: Remove some useless compatibility stuff --- src/compat.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'src/compat.h') diff --git a/src/compat.h b/src/compat.h index fb31cab..7ac864e 100644 --- a/src/compat.h +++ b/src/compat.h @@ -61,7 +61,6 @@ inline char const* lua_typename(lua_State* L_, LuaType t_) // add some Lua 5.3-style API when building for Lua 5.1 #if LUA_VERSION_NUM == 501 -#define lua501_equal lua_equal inline int lua_absindex(lua_State* L_, int idx_) { return (((idx_) >= 0 || (idx_) <= LUA_REGISTRYINDEX) ? (idx_) : lua_gettop(L_) + (idx_) + 1); @@ -107,18 +106,6 @@ int luaL_getsubtable(lua_State* L_, int idx_, const char* fname_); // wrap Lua 5.2 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 502 -#ifndef lua501_equal // already defined when compatibility is active in luaconf.h -inline int lua501_equal(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPEQ); -} -#endif // lua501_equal -#ifndef lua_lessthan // already defined when compatibility is active in luaconf.h -inline int lua_lessthan(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPLT); -} -#endif // lua_lessthan inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) { luaL_setfuncs(L_, funcs_, 0); @@ -149,18 +136,6 @@ inline int lua504_dump(lua_State* L_, lua_Writer writer_, void* data_, [[maybe_u // wrap Lua 5.3 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 503 -#ifndef lua501_equal // already defined when compatibility is active in luaconf.h -inline int lua501_equal(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPEQ); -} -#endif // lua501_equal -#ifndef lua_lessthan // already defined when compatibility is active in luaconf.h -inline int lua_lessthan(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPLT); -} -#endif // lua_lessthan inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) { luaL_setfuncs(L_, funcs_, 0); @@ -193,18 +168,6 @@ int lua_setiuservalue(lua_State* L_, int idx_, int n_); // wrap Lua 5.4 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 504 -#ifndef lua501_equal // already defined when compatibility is active in luaconf.h -inline int lua501_equal(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPEQ); -} -#endif // lua501_equal -#ifndef lua_lessthan // already defined when compatibility is active in luaconf.h -inline int lua_lessthan(lua_State* L_, int a_, int b_) -{ - return lua_compare(L_, a_, b_, LUA_OPLT); -} -#endif // lua_lessthan inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) { luaL_setfuncs(L_, funcs_, 0); -- cgit v1.2.3-55-g6feb