Imported from ../lua-3.1.tar.gz.
[lua.git] / src / ldo.h
blob0e981fbc7de4ab0b1f97cfd7150bd9241d72e170
1 /*
2 ** $Id: ldo.h,v 1.4 1997/12/15 16:17:20 roberto Exp $
3 ** Stack and Call structure of Lua
4 ** See Copyright Notice in lua.h
5 */
7 #ifndef ldo_h
8 #define ldo_h
11 #include "lobject.h"
12 #include "lstate.h"
15 #define MULT_RET 255
20 ** macro to increment stack top.
21 ** There must be always an empty slot at the L->stack.top
23 #define incr_top { if (L->stack.top >= L->stack.last) luaD_checkstack(1); \
24 L->stack.top++; }
27 /* macros to convert from lua_Object to (TObject *) and back */
29 #define Address(lo) ((lo)+L->stack.stack-1)
30 #define Ref(st) ((st)-L->stack.stack+1)
33 void luaD_init (void);
34 void luaD_adjusttop (StkId newtop);
35 void luaD_openstack (int nelems);
36 void luaD_lineHook (int line);
37 void luaD_callHook (StkId base, TProtoFunc *tf, int isreturn);
38 void luaD_call (StkId base, int nResults);
39 void luaD_callTM (TObject *f, int nParams, int nResults);
40 int luaD_protectedrun (int nResults);
41 void luaD_gcIM (TObject *o);
42 void luaD_travstack (int (*fn)(TObject *));
43 void luaD_checkstack (int n);
46 #endif