Merge branch 'main' into dev
This commit is contained in:
commit
61e85ad575
@ -569,9 +569,18 @@ local removed_names = {
|
|||||||
"getregistry", "getupvalue", "setupvalue", "upvalueid", "upvaluejoin",
|
"getregistry", "getupvalue", "setupvalue", "upvalueid", "upvaluejoin",
|
||||||
"sethook", "gethook", "getinfo"
|
"sethook", "gethook", "getinfo"
|
||||||
}
|
}
|
||||||
|
local _getinfo = debug.getinfo
|
||||||
for i, name in ipairs(removed_names) do
|
for i, name in ipairs(removed_names) do
|
||||||
debug[name] = nil
|
debug[name] = nil
|
||||||
end
|
end
|
||||||
|
debug.getinfo = function(lvl, fields)
|
||||||
|
if type(lvl) == "number" then
|
||||||
|
lvl = lvl + 1
|
||||||
|
end
|
||||||
|
local debuginfo = _getinfo(lvl, fields)
|
||||||
|
debuginfo.func = nil
|
||||||
|
return debuginfo
|
||||||
|
end
|
||||||
|
|
||||||
-- --------- Deprecated functions ------ --
|
-- --------- Deprecated functions ------ --
|
||||||
local function wrap_deprecated(func, name, alternatives)
|
local function wrap_deprecated(func, name, alternatives)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user