aboutsummaryrefslogtreecommitdiff
path: root/c-api
diff options
context:
space:
mode:
authorThePhD <phdofthehouse@gmail.com>2017-09-13 00:44:25 -0400
committerThePhD <phdofthehouse@gmail.com>2017-09-13 00:44:25 -0400
commit7320d58358de2d981135e7d8ef03eaed665bb2bc (patch)
tree6af8ab08b01f3873f6f10b5c1ea628f8d69c540c /c-api
parent08212947bb97a5fffa2e56ddd6313710758896d0 (diff)
downloadlua-compat-5.3-7320d58358de2d981135e7d8ef03eaed665bb2bc.tar.gz
lua-compat-5.3-7320d58358de2d981135e7d8ef03eaed665bb2bc.tar.bz2
lua-compat-5.3-7320d58358de2d981135e7d8ef03eaed665bb2bc.zip
define LUA_ERRGCMM code for return values
Diffstat (limited to 'c-api')
-rw-r--r--c-api/compat-5.3.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h
index 3d20d21..6c76930 100644
--- a/c-api/compat-5.3.h
+++ b/c-api/compat-5.3.h
@@ -88,6 +88,19 @@ extern "C" {
88# define LUA_OPLE 2 88# define LUA_OPLE 2
89#endif 89#endif
90 90
91/* LuaJIT/Lua 5.1 does not have the updated
92 * error codes for thread status/function returns (but some patched versions do)
93 * define it only if it's not found
94 */
95#if !defined(LUA_ERRGCMM)
96/* Use + 2 because in some versions of Lua (Lua 5.1)
97 * LUA_ERRFILE is defined as (LUA_ERRERR+1)
98 * so we need to avoid it (LuaJIT might have something at this
99 * integer value too)
100 */
101# define LUA_ERRGCMM (LUA_ERRERR + 2)
102#endif /* LUA_ERRGCMM define */
103
91typedef size_t lua_Unsigned; 104typedef size_t lua_Unsigned;
92 105
93typedef struct luaL_Buffer_53 { 106typedef struct luaL_Buffer_53 {