diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-04 09:21:15 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-04 09:21:15 +0200 |
commit | 3a86e1f2fde002199fff0ca4bb2ed4674b32ec8e (patch) | |
tree | a2e2f10dff1b6659fdc69f4ac205bbae6f9da604 /src/compat.h | |
parent | 2baf7a6e001951d08098149d80d7ce79e7035a16 (diff) | |
download | lanes-3a86e1f2fde002199fff0ca4bb2ed4674b32ec8e.tar.gz lanes-3a86e1f2fde002199fff0ca4bb2ed4674b32ec8e.tar.bz2 lanes-3a86e1f2fde002199fff0ca4bb2ed4674b32ec8e.zip |
Remove some useless compatibility stuff
Diffstat (limited to 'src/compat.h')
-rw-r--r-- | src/compat.h | 37 |
1 files changed, 0 insertions, 37 deletions
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_) | |||
61 | // add some Lua 5.3-style API when building for Lua 5.1 | 61 | // add some Lua 5.3-style API when building for Lua 5.1 |
62 | #if LUA_VERSION_NUM == 501 | 62 | #if LUA_VERSION_NUM == 501 |
63 | 63 | ||
64 | #define lua501_equal lua_equal | ||
65 | inline int lua_absindex(lua_State* L_, int idx_) | 64 | inline int lua_absindex(lua_State* L_, int idx_) |
66 | { | 65 | { |
67 | return (((idx_) >= 0 || (idx_) <= LUA_REGISTRYINDEX) ? (idx_) : lua_gettop(L_) + (idx_) + 1); | 66 | 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_); | |||
107 | // wrap Lua 5.2 calls under Lua 5.1 API when it is simpler that way | 106 | // wrap Lua 5.2 calls under Lua 5.1 API when it is simpler that way |
108 | #if LUA_VERSION_NUM == 502 | 107 | #if LUA_VERSION_NUM == 502 |
109 | 108 | ||
110 | #ifndef lua501_equal // already defined when compatibility is active in luaconf.h | ||
111 | inline int lua501_equal(lua_State* L_, int a_, int b_) | ||
112 | { | ||
113 | return lua_compare(L_, a_, b_, LUA_OPEQ); | ||
114 | } | ||
115 | #endif // lua501_equal | ||
116 | #ifndef lua_lessthan // already defined when compatibility is active in luaconf.h | ||
117 | inline int lua_lessthan(lua_State* L_, int a_, int b_) | ||
118 | { | ||
119 | return lua_compare(L_, a_, b_, LUA_OPLT); | ||
120 | } | ||
121 | #endif // lua_lessthan | ||
122 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) | 109 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) |
123 | { | 110 | { |
124 | luaL_setfuncs(L_, funcs_, 0); | 111 | luaL_setfuncs(L_, funcs_, 0); |
@@ -149,18 +136,6 @@ inline int lua504_dump(lua_State* L_, lua_Writer writer_, void* data_, [[maybe_u | |||
149 | // wrap Lua 5.3 calls under Lua 5.1 API when it is simpler that way | 136 | // wrap Lua 5.3 calls under Lua 5.1 API when it is simpler that way |
150 | #if LUA_VERSION_NUM == 503 | 137 | #if LUA_VERSION_NUM == 503 |
151 | 138 | ||
152 | #ifndef lua501_equal // already defined when compatibility is active in luaconf.h | ||
153 | inline int lua501_equal(lua_State* L_, int a_, int b_) | ||
154 | { | ||
155 | return lua_compare(L_, a_, b_, LUA_OPEQ); | ||
156 | } | ||
157 | #endif // lua501_equal | ||
158 | #ifndef lua_lessthan // already defined when compatibility is active in luaconf.h | ||
159 | inline int lua_lessthan(lua_State* L_, int a_, int b_) | ||
160 | { | ||
161 | return lua_compare(L_, a_, b_, LUA_OPLT); | ||
162 | } | ||
163 | #endif // lua_lessthan | ||
164 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) | 139 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) |
165 | { | 140 | { |
166 | luaL_setfuncs(L_, funcs_, 0); | 141 | luaL_setfuncs(L_, funcs_, 0); |
@@ -193,18 +168,6 @@ int lua_setiuservalue(lua_State* L_, int idx_, int n_); | |||
193 | // wrap Lua 5.4 calls under Lua 5.1 API when it is simpler that way | 168 | // wrap Lua 5.4 calls under Lua 5.1 API when it is simpler that way |
194 | #if LUA_VERSION_NUM == 504 | 169 | #if LUA_VERSION_NUM == 504 |
195 | 170 | ||
196 | #ifndef lua501_equal // already defined when compatibility is active in luaconf.h | ||
197 | inline int lua501_equal(lua_State* L_, int a_, int b_) | ||
198 | { | ||
199 | return lua_compare(L_, a_, b_, LUA_OPEQ); | ||
200 | } | ||
201 | #endif // lua501_equal | ||
202 | #ifndef lua_lessthan // already defined when compatibility is active in luaconf.h | ||
203 | inline int lua_lessthan(lua_State* L_, int a_, int b_) | ||
204 | { | ||
205 | return lua_compare(L_, a_, b_, LUA_OPLT); | ||
206 | } | ||
207 | #endif // lua_lessthan | ||
208 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) | 171 | inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) |
209 | { | 172 | { |
210 | luaL_setfuncs(L_, funcs_, 0); | 173 | luaL_setfuncs(L_, funcs_, 0); |