aboutsummaryrefslogtreecommitdiff
path: root/tests/lua/src/lapi.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-01 10:01:16 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-01 10:01:16 -0700
commit18c03af5f0ee66eb0d75ba3892cd31c72ea6d5c2 (patch)
tree499f1d85ab2a8431a1137cecb8f8fb82d4d41f7c /tests/lua/src/lapi.h
parent48ae14de71a389f29fdb6542e04e1c805788f5bb (diff)
parentcb42d258c2ca1035cac73e7635992d997f9df735 (diff)
Merge branch 'newtriple' into incoming
Diffstat (limited to 'tests/lua/src/lapi.h')
-rw-r--r--tests/lua/src/lapi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lua/src/lapi.h b/tests/lua/src/lapi.h
new file mode 100644
index 00000000..0909a391
--- /dev/null
+++ b/tests/lua/src/lapi.h
@@ -0,0 +1,24 @@
+/*
+** $Id: lapi.h,v 2.7 2009/11/27 15:37:59 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