From 9e6807c3c9d5036e999f636f936df07b72284442 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Jul 2019 09:41:10 -0300 Subject: Do not collect open upvalues Open upvalues are kept alive together with their corresponding stack. This change makes a simpler and safer fix to the issue in commit 440a5ee78c8, about upvalues in the list of open upvalues being collected while others are being created. (That previous fix may not be correct.) --- lfunc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lfunc.h') diff --git a/lfunc.h b/lfunc.h index 72fc913a..0ed79c48 100644 --- a/lfunc.h +++ b/lfunc.h @@ -57,7 +57,7 @@ LUAI_FUNC Proto *luaF_newproto (lua_State *L); LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nelems); LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nelems); LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl); -LUAI_FUNC void luaF_setupval (lua_State *L, StkId level, UpVal **slot); +LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); LUAI_FUNC void luaF_newtbcupval (lua_State *L, StkId level); LUAI_FUNC int luaF_close (lua_State *L, StkId level, int status); LUAI_FUNC void luaF_unlinkupval (UpVal *uv); -- cgit v1.2.3-55-g6feb