aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/lua/src/lapi.h
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-10-05 01:38:18 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit8df3e437f941912067231250ff5695b8a3a7fd92 (patch)
treec812fb252ad0f8a48041aff28b7fc60a75f245d1 /3rdparty/lua/src/lapi.h
parent8364673ab93eb484e25c7c4776e5d705b73330b4 (diff)
LUA lib and bin embedded in project
Change-Id: I1a61b49f55e4daa305800e754a14b6041aa81b34 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to '3rdparty/lua/src/lapi.h')
-rw-r--r--3rdparty/lua/src/lapi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/3rdparty/lua/src/lapi.h b/3rdparty/lua/src/lapi.h
new file mode 100644
index 0000000..6d36dee
--- /dev/null
+++ b/3rdparty/lua/src/lapi.h
@@ -0,0 +1,24 @@
+/*
+** $Id: lapi.h,v 2.9 2015/03/06 19:49: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, 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