1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Fix debug.getinfo not being unset in CPCSM (#16506)

regression was introduced in eeb6cab
This commit is contained in:
DS
2025-10-01 12:52:48 +02:00
committed by GitHub
parent 499f2284bd
commit ae35167a5e
6 changed files with 15 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
local builtin_shared = ...
local debug_getinfo = debug.getinfo
do
local default = {mod = "??", name = "??"}
@@ -56,7 +57,7 @@ function builtin_shared.make_registration()
core.callback_origins[func] = {
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
name = debug_getinfo(1, "n").name or "??"
}
end
return t, registerfunc
@@ -69,7 +70,7 @@ function builtin_shared.make_registration_reverse()
core.callback_origins[func] = {
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
name = debug_getinfo(1, "n").name or "??"
}
end
return t, registerfunc