Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/openzfs/module/lua/lapi.h
48383 views
1
// SPDX-License-Identifier: MIT
2
/*
3
** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $
4
** Auxiliary functions from Lua API
5
** See Copyright Notice in lua.h
6
*/
7
8
#ifndef lapi_h
9
#define lapi_h
10
11
12
#include "llimits.h"
13
#include "lstate.h"
14
15
#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
16
"stack overflow");}
17
18
#define adjustresults(L,nres) \
19
{ if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
20
21
#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
22
"not enough elements in the stack")
23
24
25
#endif
26
27