lua/lapi.h

25 lines
543 B
C
Raw Normal View History

1997-09-16 23:25:59 +04:00
/*
** $Id: lapi.h,v 2.7 2009/11/27 15:37:59 roberto Exp roberto $
1998-06-19 20:14:09 +04:00
** Auxiliary functions from Lua API
1997-09-16 23:25:59 +04:00
** See Copyright Notice in lua.h
*/
#ifndef lapi_h
#define lapi_h
#include "llimits.h"
#include "lstate.h"
1997-09-16 23:25:59 +04:00
#define api_incr_top(L) {L->top++; api_check(L->top <= L->ci->top, \
"stack overflow");}
1997-09-16 23:25:59 +04:00
#define adjustresults(L,nres) \
2009-04-03 19:58:03 +04:00
{ if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
#define api_checknelems(L,n) api_check((n) < (L->top - L->ci->func), \
"not enough elements in the stack")
1997-09-16 23:25:59 +04:00
#endif