hide unsafe debug.* functions

This commit is contained in:
MihailRis 2025-07-21 21:40:47 +03:00
parent 1733c37922
commit 5f02326a80

View File

@ -523,6 +523,15 @@ function time.post_runnable(runnable)
table.insert(__post_runnables, runnable)
end
-- Hide unsafe debug.* functions
local removed_names = {
"getregistry", "getupvalue", "setupvalue", "upvalueid", "upvaluejoin",
"sethook", "gethook", "getinfo"
}
for i, name in ipairs(removed_names) do
debug[name] = nil
end
-- --------- Deprecated functions ------ --
local function wrap_deprecated(func, name, alternatives)
return function (...)