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

unset debug.getinfo

This commit is contained in:
Desour 2025-03-25 13:45:22 +01:00
parent 5f5ea13251
commit 7477e74d67
6 changed files with 18 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