Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ldo.h 1.5 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. ** $Id: ldo.h,v 2.20 2011/11/29 15:55:08 roberto Exp $
  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. #include "lzio.h"
  11. #define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \
  12. luaD_growstack(L, n); else condmovestack(L);
  13. #define incr_top(L) {L->top++; luaD_checkstack(L,0);}
  14. #define savestack(L,p) ((char *)(p) - (char *)L->stack)
  15. #define restorestack(L,n) ((TValue *)((char *)L->stack + (n)))
  16. /* type of protected functions, to be ran by `runprotected' */
  17. typedef void (*Pfunc) (lua_State *L, void *ud);
  18. LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
  19. const char *mode);
  20. LUAI_FUNC void luaD_hook (lua_State *L, int event, int line);
  21. LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);
  22. LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults,
  23. int allowyield);
  24. LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
  25. ptrdiff_t oldtop, ptrdiff_t ef);
  26. LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
  27. LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
  28. LUAI_FUNC void luaD_growstack (lua_State *L, int n);
  29. LUAI_FUNC void luaD_shrinkstack (lua_State *L);
  30. LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode);
  31. LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
  32. #endif