aboutsummaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/ldo.h b/ldo.h
index 83ed513b..6b3649d6 100644
--- a/ldo.h
+++ b/ldo.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldo.h,v 1.38 2002/01/11 20:24:39 roberto Exp $ 2** $Id: ldo.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $
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*/
@@ -16,10 +16,10 @@
16** macro to increment stack top. 16** macro to increment stack top.
17** There must be always an empty slot at the L->stack.top 17** There must be always an empty slot at the L->stack.top
18*/ 18*/
19#define incr_top {if (L->top == L->stack_last) luaD_checkstack(L, 1); L->top++;} 19#define incr_top(L) \
20 {if (L->top >= L->stack_last) luaD_growstack(L, 1); L->top++;}
20 21
21 22#define luaD_checkstack(L,n) if (L->stack_last-(n)<=L->top) luaD_growstack(L, n)
22#define luaD_checkstack(L,n) if (L->stack_last-(n)<=L->top) luaD_stackerror(L)
23 23
24 24
25void luaD_lineHook (lua_State *L, int line, lua_Hook linehook); 25void luaD_lineHook (lua_State *L, int line, lua_Hook linehook);
@@ -27,7 +27,9 @@ void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event);
27StkId luaD_precall (lua_State *L, StkId func); 27StkId luaD_precall (lua_State *L, StkId func);
28void luaD_call (lua_State *L, StkId func, int nResults); 28void luaD_call (lua_State *L, StkId func, int nResults);
29void luaD_poscall (lua_State *L, int wanted, StkId firstResult); 29void luaD_poscall (lua_State *L, int wanted, StkId firstResult);
30void luaD_stackerror (lua_State *L); 30void luaD_reallocCI (lua_State *L, int newsize);
31void luaD_reallocstack (lua_State *L, int newsize);
32void luaD_growstack (lua_State *L, int n);
31 33
32void luaD_error (lua_State *L, const char *s); 34void luaD_error (lua_State *L, const char *s);
33void luaD_breakrun (lua_State *L, int errcode); 35void luaD_breakrun (lua_State *L, int errcode);