From a674fbe45df718f194948a7fa399c58fd9672519 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 7 Jun 2015 20:55:38 +0000 Subject: MirLua: initial commit git-svn-id: http://svn.miranda-ng.org/main/trunk@14061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/lua/lapi.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 plugins/MirLua/src/lua/lapi.h (limited to 'plugins/MirLua/src/lua/lapi.h') diff --git a/plugins/MirLua/src/lua/lapi.h b/plugins/MirLua/src/lua/lapi.h new file mode 100644 index 0000000000..092f5e974c --- /dev/null +++ b/plugins/MirLua/src/lua/lapi.h @@ -0,0 +1,24 @@ +/* +** $Id: lapi.h,v 2.8 2014/07/15 21:26:50 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->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((n) < (L->top - L->ci->func), \ + "not enough elements in the stack") + + +#endif -- cgit v1.2.3