summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/lua/lapi.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-07 20:55:38 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-07 20:55:38 +0000
commita674fbe45df718f194948a7fa399c58fd9672519 (patch)
treefe59698871070fed40af646e5e83c22d47e69b7c /plugins/MirLua/src/lua/lapi.h
parentba275795eba1936a3c395527cc55936a4dc02f9d (diff)
MirLua: initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@14061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/lua/lapi.h')
-rw-r--r--plugins/MirLua/src/lua/lapi.h24
1 files changed, 24 insertions, 0 deletions
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