From 3b0ce0e28db46d0403929aba45c682285e1ac217 Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Mon, 24 Aug 2020 22:48:19 +0000 Subject: Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b Sponsored by: iX Systems, Inc. --- module/lua/lapi.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 module/lua/lapi.h (limited to 'module/lua/lapi.h') diff --git a/module/lua/lapi.h b/module/lua/lapi.h new file mode 100644 index 000000000000..509f46f692a7 --- /dev/null +++ b/module/lua/lapi.h @@ -0,0 +1,26 @@ +/* BEGIN CSTYLED */ +/* +** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $ +** Auxiliary functions from Lua API +** See Copyright Notice in lua.h +*/ + +#ifndef lapi_h +#define lapi_h + + +#include "llimits.h" +#include "lstate.h" + +#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ + "stack overflow");} + +#define adjustresults(L,nres) \ + { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } + +#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ + "not enough elements in the stack") + + +#endif +/* END CSTYLED */ -- cgit v1.3