mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
hide unsafe debug.* functions
This commit is contained in:
parent
1733c37922
commit
5f02326a80
1 changed files with 9 additions and 0 deletions
|
|
@ -523,6 +523,15 @@ function time.post_runnable(runnable)
|
||||||
table.insert(__post_runnables, runnable)
|
table.insert(__post_runnables, runnable)
|
||||||
end
|
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 ------ --
|
-- --------- Deprecated functions ------ --
|
||||||
local function wrap_deprecated(func, name, alternatives)
|
local function wrap_deprecated(func, name, alternatives)
|
||||||
return function (...)
|
return function (...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue