diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-17 22:12:00 +0200 |
commit | 21df26984da91143c15587f5a03c98d68c3adc4e (patch) | |
tree | aaa707a628ad331f67890023dffe1b4f60dd01d3 /builtin/common/strict.lua | |
parent | b09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff) | |
parent | eabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff) | |
download | dragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'builtin/common/strict.lua')
-rw-r--r-- | builtin/common/strict.lua | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/builtin/common/strict.lua b/builtin/common/strict.lua index ccde9676b..f46234dc6 100644 --- a/builtin/common/strict.lua +++ b/builtin/common/strict.lua @@ -1,8 +1,3 @@ - --- Always warn when creating a global variable, even outside of a function. --- This ignores mod namespaces (variables with the same name as the current mod). -local WARN_INIT = false - local getinfo = debug.getinfo function core.global_exists(name) @@ -33,11 +28,6 @@ function meta:__newindex(name, value) end declared[name] = true end - -- Ignore mod namespaces - if WARN_INIT and name ~= core.get_current_modname() then - core.log("warning", ("Global variable %q created at %s.") - :format(name, desc)) - end rawset(self, name, value) end @@ -54,4 +44,3 @@ function meta:__index(name) end setmetatable(_G, meta) - |