From b1379936cf35787d3ef3aab82d1607a3e1562eef Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 9 Feb 2018 13:16:06 -0200 Subject: vararg back to '...' (but with another implementation) new implementation should have zero overhead for non-vararg functions --- ldo.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ldo.h') diff --git a/ldo.h b/ldo.h index 44e3af20..864cf3e6 100644 --- a/ldo.h +++ b/ldo.h @@ -1,5 +1,5 @@ /* -** $Id: ldo.h,v 2.39 2018/01/10 19:19:27 roberto Exp roberto $ +** $Id: ldo.h,v 2.40 2018/02/06 19:16:56 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -42,6 +42,11 @@ p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ +/* macro to check stack size and GC */ +#define checkstackGC(L,fsize) \ + luaD_checkstackaux(L, (fsize), (void)0, luaC_checkGC(L)) + + /* type of protected functions, to be ran by 'runprotected' */ typedef void (*Pfunc) (lua_State *L, void *ud); @@ -57,7 +62,10 @@ LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t oldtop, ptrdiff_t ef); LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres); +LUAI_FUNC void luaD_rethook (lua_State *L, CallInfo *ci); LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror); +LUAI_FUNC void luaD_moveresults (lua_State *L, StkId firstResult, StkId res, + int nres, int wanted); LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror); LUAI_FUNC void luaD_shrinkstack (lua_State *L); LUAI_FUNC void luaD_inctop (lua_State *L); -- cgit v1.2.3-55-g6feb