Software /
code /
prosody
Changeset
2825:914d7afb8212
Mainfile: Broke up a really long line.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 10 Dec 2009 01:56:16 +0500 |
parents | 2824:f24664b33a1e |
children | 2826:d8e83625ad58 |
files | prosody |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/prosody Sat Dec 05 10:26:43 2009 -0800 +++ b/prosody Thu Dec 10 01:56:16 2009 +0500 @@ -284,8 +284,11 @@ end function init_global_protection() - -- Catch global accesses -- - local locked_globals_mt = { __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end, __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end } + -- Catch global accesses + local locked_globals_mt = { + __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end; + __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end; + }; function prosody.unlock_globals() setmetatable(_G, nil);