aboutsummaryrefslogtreecommitdiff
path: root/win-build/Lua53/lapi.h
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-10-31 11:32:33 +0800
committerLi Jin <dragon-fly@qq.com>2022-11-09 11:29:32 +0800
commit417ec1a37922c6178900adfec70628cad46731ff (patch)
treea5a2d74927ad2c41b5a16264a78409e1c0334b72 /win-build/Lua53/lapi.h
parent3dd607c8887d2fe0186668aabca31bb84a41e2da (diff)
downloadyuescript-417ec1a37922c6178900adfec70628cad46731ff.tar.gz
yuescript-417ec1a37922c6178900adfec70628cad46731ff.tar.bz2
yuescript-417ec1a37922c6178900adfec70628cad46731ff.zip
fix issue #112 and issue #113.
Diffstat (limited to 'win-build/Lua53/lapi.h')
-rw-r--r--win-build/Lua53/lapi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/win-build/Lua53/lapi.h b/win-build/Lua53/lapi.h
new file mode 100644
index 0000000..8e16ad5
--- /dev/null
+++ b/win-build/Lua53/lapi.h
@@ -0,0 +1,24 @@
1/*
2** $Id: lapi.h,v 2.9.1.1 2017/04/19 17:20:42 roberto Exp $
3** Auxiliary functions from Lua API
4** See Copyright Notice in lua.h
5*/
6
7#ifndef lapi_h
8#define lapi_h
9
10
11#include "llimits.h"
12#include "lstate.h"
13
14#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \
15 "stack overflow");}
16
17#define adjustresults(L,nres) \
18 { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }
19
20#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \
21 "not enough elements in the stack")
22
23
24#endif