From 5a0c221ec5ec4d84889c1b8fc0581b5da5f172b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 3 Feb 2023 14:39:50 +0800 Subject: GC don't warn dummy function --- script/gc.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/gc.lua b/script/gc.lua index 7bb81569..ff22195e 100644 --- a/script/gc.lua +++ b/script/gc.lua @@ -27,7 +27,9 @@ local function isRemoved(obj) for i = 1, 1000 do local n, v = debug.getupvalue(obj, i) if not n then - log.warn('函数式析构器没有 removed 上值!', util.dump(debug.getinfo(obj))) + if i > 1 then + log.warn('函数式析构器没有 removed 上值!', util.dump(debug.getinfo(obj))) + end break end if n == 'removed' then -- cgit v1.2.3