aboutsummaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-13 10:04:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-13 10:04:33 -0300
commit5c8770f8969a73cf4ca503f54c2217f76de62e04 (patch)
treed5dac87490011d117277d94c81f6f2fd47b1b094 /ldo.h
parent7647d5d13d016f114dac4be0b9da62d502eab400 (diff)
downloadlua-5c8770f8969a73cf4ca503f54c2217f76de62e04.tar.gz
lua-5c8770f8969a73cf4ca503f54c2217f76de62e04.tar.bz2
lua-5c8770f8969a73cf4ca503f54c2217f76de62e04.zip
back to old-style vararg system (with vararg table collecting extra
arguments)
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ldo.h b/ldo.h
index b2065cfa..4717620f 100644
--- a/ldo.h
+++ b/ldo.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.h,v 2.28 2015/11/23 11:29:43 roberto Exp roberto $ 2** $Id: ldo.h,v 2.29 2015/12/21 13:02:14 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -33,6 +33,14 @@
33#define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) 33#define restorestack(L,n) ((TValue *)((char *)L->stack + (n)))
34 34
35 35
36/* macro to check stack size, preserving 'p' */
37#define checkstackp(L,n,p) \
38 luaD_checkstackaux(L, n, \
39 ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
40 luaC_checkGC(L), /* stack grow uses memory */ \
41 p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
42
43
36/* type of protected functions, to be ran by 'runprotected' */ 44/* type of protected functions, to be ran by 'runprotected' */
37typedef void (*Pfunc) (lua_State *L, void *ud); 45typedef void (*Pfunc) (lua_State *L, void *ud);
38 46