beta-0.89.2
[luatex.git] / source / libs / lua52 / lua52-src / src / lapi.h
blobc7d34ad84866ae10bb2358ad93d6884c761c1d78
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 */
7 #ifndef lapi_h
8 #define lapi_h
11 #include "llimits.h"
12 #include "lstate.h"
14 #define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
15 "stack overflow");}
17 #define adjustresults(L,nres) \
18 { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
20 #define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
21 "not enough elements in the stack")
24 #endif