return debug.getinfo function

This commit is contained in:
MihailRis 2025-07-26 19:12:05 +03:00
parent 00c7c986bb
commit 844eb054af

View File

@ -531,9 +531,15 @@ local removed_names = {
"getregistry", "getupvalue", "setupvalue", "upvalueid", "upvaluejoin",
"sethook", "gethook", "getinfo"
}
local _getinfo = debug.getinfo
for i, name in ipairs(removed_names) do
debug[name] = nil
end
debug.getinfo = function(...)
local debuginfo = _getinfo(...)
debuginfo.func = nil
return debuginfo
end
-- --------- Deprecated functions ------ --
local function wrap_deprecated(func, name, alternatives)