1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

unset debug.getinfo

This commit is contained in:
Desour 2025-03-25 13:45:22 +01:00
parent a2f98b1879
commit 5a422ca0c6
7 changed files with 22 additions and 10 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