aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-04 17:42:09 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-04 17:42:09 +0200
commit6d90af6ab9ccdfb2f20fb73fc2d6400c23521c0a (patch)
tree39aad9465b7cdcd1d6de05d335c168c112b8c308 /src/compat.h
parentc360af2df3e0904c7338cc1f32fcb270b7e34092 (diff)
downloadlanes-6d90af6ab9ccdfb2f20fb73fc2d6400c23521c0a.tar.gz
lanes-6d90af6ab9ccdfb2f20fb73fc2d6400c23521c0a.tar.bz2
lanes-6d90af6ab9ccdfb2f20fb73fc2d6400c23521c0a.zip
Refactored keeper implementation of linda:send()
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index 7ac864e..ceb1275 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -186,6 +186,14 @@ inline int luaL_optint(lua_State* L_, int n_, lua_Integer d_)
186 186
187// ################################################################################################# 187// #################################################################################################
188 188
189// use this in place of lua_absindex to save a function call
190inline int luaG_absindex(lua_State* L_, int idx_)
191{
192 return (((idx_) >= 0 || (idx_) <= LUA_REGISTRYINDEX) ? (idx_) : lua_gettop(L_) + (idx_) + 1);
193}
194
195// #################################################################################################
196
189// a strong-typed wrapper over lua error codes to see them easier in a debugger 197// a strong-typed wrapper over lua error codes to see them easier in a debugger
190enum class LuaError 198enum class LuaError
191{ 199{