diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
commit | 29ede6aa13144ff7b69c57a87be1ee93f57ae896 (patch) | |
tree | adcfb5dcff7db55481cd675349e23dec0e63c939 /ldo.h | |
parent | 951897c09319ae5474a4b86bb7d615136577caa0 (diff) | |
download | lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.gz lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.bz2 lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.zip |
first implementation of multiple states (reentrant code).
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.h,v 1.8 1999/10/04 17:51:04 roberto Exp roberto $ | 2 | ** $Id: ldo.h,v 1.9 1999/10/14 19:46:57 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 | */ |
@@ -20,26 +20,26 @@ | |||
20 | ** macro to increment stack top. | 20 | ** macro to increment stack top. |
21 | ** There must be always an empty slot at the L->stack.top | 21 | ** There must be always an empty slot at the L->stack.top |
22 | */ | 22 | */ |
23 | #define incr_top { if (L->stack.top >= L->stack.last) luaD_checkstack(1); \ | 23 | #define incr_top { if (L->stack.top >= L->stack.last) luaD_checkstack(L, 1); \ |
24 | L->stack.top++; } | 24 | L->stack.top++; } |
25 | 25 | ||
26 | 26 | ||
27 | /* macros to convert from lua_Object to (TObject *) and back */ | 27 | /* macros to convert from lua_Object to (TObject *) and back */ |
28 | 28 | ||
29 | #define Address(lo) ((lo)+L->stack.stack-1) | 29 | #define Address(L, lo) ((lo)+L->stack.stack-1) |
30 | #define Ref(st) ((st)-L->stack.stack+1) | 30 | #define Ref(L, st) ((st)-L->stack.stack+1) |
31 | 31 | ||
32 | 32 | ||
33 | void luaD_init (void); | 33 | void luaD_init (lua_State *L); |
34 | void luaD_adjusttop (StkId newtop); | 34 | void luaD_adjusttop (lua_State *L, StkId newtop); |
35 | void luaD_openstack (int nelems); | 35 | void luaD_openstack (lua_State *L, int nelems); |
36 | void luaD_lineHook (int line); | 36 | void luaD_lineHook (lua_State *L, int line); |
37 | void luaD_callHook (StkId base, const TProtoFunc *tf, int isreturn); | 37 | void luaD_callHook (lua_State *L, StkId base, const TProtoFunc *tf, int isreturn); |
38 | void luaD_calln (int nArgs, int nResults); | 38 | void luaD_calln (lua_State *L, int nArgs, int nResults); |
39 | void luaD_callTM (const TObject *f, int nParams, int nResults); | 39 | void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults); |
40 | int luaD_protectedrun (void); | 40 | int luaD_protectedrun (lua_State *L); |
41 | void luaD_gcIM (const TObject *o); | 41 | void luaD_gcIM (lua_State *L, const TObject *o); |
42 | void luaD_checkstack (int n); | 42 | void luaD_checkstack (lua_State *L, int n); |
43 | 43 | ||
44 | 44 | ||
45 | #endif | 45 | #endif |