aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h37
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
65inline int lua_absindex(lua_State* L_, int idx_) 64inline 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
111inline 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
117inline 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
122inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) 109inline 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
153inline 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
159inline 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
164inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) 139inline 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
197inline 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
203inline 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
208inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[]) 171inline void luaG_registerlibfuncs(lua_State* L_, luaL_Reg const funcs_[])
209{ 172{
210 luaL_setfuncs(L_, funcs_, 0); 173 luaL_setfuncs(L_, funcs_, 0);