2022-03-24 13:23:42 +00:00
|
|
|
# 1 "./lua/lapi.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
#ifndef lapi_h
|
2022-03-24 13:23:42 +00:00
|
|
|
#define lapi_h
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "llimits.h"
|
|
|
|
#include "lstate.h"
|
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
|
|
|
|
#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
|
|
|
|
"stack overflow");}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define adjustresults(L,nres) \
|
|
|
|
{ if ((nres) <= LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
|
|
|
|
"not enough elements in the stack")
|
|
|
|
# 43 "./lua/lapi.h"
|
|
|
|
#define hastocloseCfunc(n) ((n) < LUA_MULTRET)
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define codeNresults(n) (-(n) - 3)
|
|
|
|
#define decodeNresults(n) (-(n) - 3)
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
#endif
|