From 38908616d0e08b72e6b00d18490ed917fa643e4f Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 17 Aug 2021 23:09:27 +0800 Subject: reset Yuescript version since it's a minor version with new feature. update Lua lib. --- src/3rdParty/lua/lbaselib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/3rdParty/lua/lbaselib.c') diff --git a/src/3rdParty/lua/lbaselib.c b/src/3rdParty/lua/lbaselib.c index 83ad306..fd6687e 100644 --- a/src/3rdParty/lua/lbaselib.c +++ b/src/3rdParty/lua/lbaselib.c @@ -261,6 +261,11 @@ static int luaB_next (lua_State *L) { } +static int pairscont (lua_State *L, int status, lua_KContext k) { + (void)L; (void)status; (void)k; /* unused */ + return 3; +} + static int luaB_pairs (lua_State *L) { luaL_checkany(L, 1); if (luaL_getmetafield(L, 1, "__pairs") == LUA_TNIL) { /* no metamethod? */ @@ -270,7 +275,7 @@ static int luaB_pairs (lua_State *L) { } else { lua_pushvalue(L, 1); /* argument 'self' to metamethod */ - lua_call(L, 1, 3); /* get 3 values from metamethod */ + lua_callk(L, 1, 3, 0, pairscont); /* get 3 values from metamethod */ } return 3; } -- cgit v1.2.3-55-g6feb