aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/ldo.h
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
committerLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
commit827c3736f357e09168fc108e8e740c6425d37d9b (patch)
tree259f977bf7f4ebe0e397fe5e1b74e7fbb1b75e8e /src/3rdParty/lua/ldo.h
parentaed806476fe50899c0f01750175531ac41267b9d (diff)
downloadyuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.gz
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.bz2
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.zip
fix a wrong code generating issue, update builtin Lua.
Diffstat (limited to 'src/3rdParty/lua/ldo.h')
-rw-r--r--src/3rdParty/lua/ldo.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/3rdParty/lua/ldo.h b/src/3rdParty/lua/ldo.h
index 49fbb49..9fb772f 100644
--- a/src/3rdParty/lua/ldo.h
+++ b/src/3rdParty/lua/ldo.h
@@ -49,18 +49,6 @@
49 luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0) 49 luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)
50 50
51 51
52/*
53** 'luaD_precall' is used for regular calls, when it needs the
54** number of results, and in tail calls, when it needs the 'delta'
55** (correction of base for vararg functions). The argument 'retdel'
56** codes these two options. A number of results is represented by
57** itself, while a delta is represented by 'delta2retdel(delta)'
58*/
59#define delta2retdel(d) (-(d) + LUA_MULTRET - 1)
60#define retdel2delta(d) (-(d) + LUA_MULTRET - 1)
61#define isdelta(rd) ((rd) < LUA_MULTRET)
62
63
64/* type of protected functions, to be ran by 'runprotected' */ 52/* type of protected functions, to be ran by 'runprotected' */
65typedef void (*Pfunc) (lua_State *L, void *ud); 53typedef void (*Pfunc) (lua_State *L, void *ud);
66 54
@@ -70,10 +58,11 @@ LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
70LUAI_FUNC void luaD_hook (lua_State *L, int event, int line, 58LUAI_FUNC void luaD_hook (lua_State *L, int event, int line,
71 int fTransfer, int nTransfer); 59 int fTransfer, int nTransfer);
72LUAI_FUNC void luaD_hookcall (lua_State *L, CallInfo *ci); 60LUAI_FUNC void luaD_hookcall (lua_State *L, CallInfo *ci);
73LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int retdel); 61LUAI_FUNC void luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int n);
62LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults);
74LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults); 63LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
75LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults); 64LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults);
76LUAI_FUNC void luaD_tryfuncTM (lua_State *L, StkId func); 65LUAI_FUNC StkId luaD_tryfuncTM (lua_State *L, StkId func);
77LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status); 66LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status);
78LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, 67LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
79 ptrdiff_t oldtop, ptrdiff_t ef); 68 ptrdiff_t oldtop, ptrdiff_t ef);