PageRenderTime 84ms CodeModel.GetById 42ms RepoModel.GetById 3ms app.codeStats 0ms

/lua/lapi.h

https://bitbucket.org/cesbo/astra
C Header | 24 lines | 11 code | 8 blank | 5 comment | 3 complexity | 87a06b0eac95f44d3973173c930354f3 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0
  1. /*
  2. ** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
  3. ** Auxiliary functions from Lua API
  4. ** See Copyright Notice in lua.h
  5. */
  6. #ifndef lapi_h
  7. #define lapi_h
  8. #include "llimits.h"
  9. #include "lstate.h"
  10. #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
  11. "stack overflow");}
  12. #define adjustresults(L,nres) \
  13. { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
  14. #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
  15. "not enough elements in the stack")
  16. #endif