aboutsummaryrefslogtreecommitdiff
path: root/c-api/compat-5.3.h
diff options
context:
space:
mode:
Diffstat (limited to 'c-api/compat-5.3.h')
-rw-r--r--c-api/compat-5.3.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h
index bee77a1..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 {
@@ -186,6 +199,9 @@ COMPAT53_API int luaL_execresult (lua_State *L, int stat);
186#define lua_pcallk(L, na, nr, err, ctx, cont) \ 199#define lua_pcallk(L, na, nr, err, ctx, cont) \
187 ((void)(ctx), (void)(cont), lua_pcall((L), (na), (nr), (err))) 200 ((void)(ctx), (void)(cont), lua_pcall((L), (na), (nr), (err)))
188 201
202#define lua_resume(L, from, nargs) \
203 ((void)(from), lua_resume((L), (nargs)))
204
189#define luaL_buffinit COMPAT53_CONCAT(COMPAT53_PREFIX, _buffinit_53) 205#define luaL_buffinit COMPAT53_CONCAT(COMPAT53_PREFIX, _buffinit_53)
190COMPAT53_API void luaL_buffinit (lua_State *L, luaL_Buffer_53 *B); 206COMPAT53_API void luaL_buffinit (lua_State *L, luaL_Buffer_53 *B);
191 207