ldo.h 1014 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. ** $Id: ldo.h,v 1.16 1999/12/30 18:28:40 roberto Exp roberto $
  3. ** Stack and Call structure of Lua
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef ldo_h
  7. #define ldo_h
  8. #include "lobject.h"
  9. #include "lstate.h"
  10. #define MULT_RET 255
  11. /*
  12. ** macro to increment stack top.
  13. ** There must be always an empty slot at the L->stack.top
  14. */
  15. #define incr_top {if (L->top == L->stack_last) luaD_checkstack(L, 1); L->top++;}
  16. void luaD_init (lua_State *L, int stacksize);
  17. void luaD_adjusttop (lua_State *L, StkId base, int extra);
  18. void luaD_openstack (lua_State *L, StkId pos);
  19. void luaD_callHook (lua_State *L, StkId func, lua_Dbghook callhook,
  20. const char *event);
  21. void luaD_lineHook (lua_State *L, StkId func, int line);
  22. void luaD_call (lua_State *L, StkId func, int nResults);
  23. void luaD_callTM (lua_State *L, const TObject *f, int nParams, int nResults);
  24. int luaD_protectedrun (lua_State *L);
  25. void luaD_gcIM (lua_State *L, const TObject *o);
  26. void luaD_checkstack (lua_State *L, int n);
  27. #endif