ldo.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. ** $Id: ldo.h,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $
  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. /*
  11. ** macro to increment stack top.
  12. ** There must be always an empty slot at the L->stack.top
  13. */
  14. #define incr_top {if (L->top == L->stack_last) luaD_checkstack(L, 1); L->top++;}
  15. #define luaD_checkstack(L,n) if (L->stack_last-(n)<=L->top) luaD_stackerror(L)
  16. void luaD_init (lua_State *L, int stacksize);
  17. void luaD_lineHook (lua_State *L, int line, lua_Hook linehook);
  18. void luaD_callHook (lua_State *L, lua_Hook callhook, const char *event);
  19. StkId luaD_precall (lua_State *L, StkId func);
  20. void luaD_call (lua_State *L, StkId func, int nResults);
  21. void luaD_poscall (lua_State *L, int wanted, StkId firstResult);
  22. void luaD_stackerror (lua_State *L);
  23. void luaD_error (lua_State *L, const char *s);
  24. void luaD_breakrun (lua_State *L, int errcode);
  25. int luaD_runprotected (lua_State *L, void (*f)(lua_State *, void *), void *ud);
  26. #endif