projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b4aaa5
)
Change assignment to global in a function to warning
author
rubenwardy
<rubenwardy@gmail.com>
Wed, 4 Feb 2015 10:18:16 +0000
(10:18 +0000)
committer
ShadowNinja
<shadowninja@minetest.net>
Wed, 4 Feb 2015 19:57:06 +0000
(14:57 -0500)
builtin/common/strict.lua
patch
|
blob
|
history
diff --git
a/builtin/common/strict.lua
b/builtin/common/strict.lua
index 91d1f5b19f9bb17683a21197bd2e4f5af100f09a..c353bb913b8c3f73310f66e67f130fa5277177f0 100644
(file)
--- a/
builtin/common/strict.lua
+++ b/
builtin/common/strict.lua
@@
-22,7
+22,7
@@
function meta:__newindex(name, value)
info.currentline, name)
if not warned[warn_key] and info.what ~= "main" and
info.what ~= "C" then
-
minetest.log("error",
("Assignment to undeclared "..
+
warn(
("Assignment to undeclared "..
"global %q inside a function at %s.")
:format(name, desc))
warned[warn_key] = true