summaryrefslogtreecommitdiff
path: root/source/luametatex/source/luacore/lua54/src/lapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/source/luacore/lua54/src/lapi.h')
-rw-r--r--source/luametatex/source/luacore/lua54/src/lapi.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/luametatex/source/luacore/lua54/src/lapi.h b/source/luametatex/source/luacore/lua54/src/lapi.h
index 9e99cc448..a742427cd 100644
--- a/source/luametatex/source/luacore/lua54/src/lapi.h
+++ b/source/luametatex/source/luacore/lua54/src/lapi.h
@@ -12,23 +12,26 @@
#include "lstate.h"
-/* Increments 'L->top', checking for stack overflows */
-#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
- "stack overflow");}
+/* Increments 'L->top.p', checking for stack overflows */
+#define api_incr_top(L) {L->top.p++; \
+ api_check(L, L->top.p <= L->ci->top.p, \
+ "stack overflow");}
/*
** If a call returns too many multiple returns, the callee may not have
** stack space to accommodate all results. In this case, this macro
-** increases its stack space ('L->ci->top').
+** increases its stack space ('L->ci->top.p').
*/
#define adjustresults(L,nres) \
- { if ((nres) <= LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
+ { if ((nres) <= LUA_MULTRET && L->ci->top.p < L->top.p) \
+ L->ci->top.p = L->top.p; }
/* Ensure the stack has at least 'n' elements */
-#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
- "not enough elements in the stack")
+#define api_checknelems(L,n) \
+ api_check(L, (n) < (L->top.p - L->ci->func.p), \
+ "not enough elements in the stack")
/*