diff options
author | Volker Lendecke <vl@samba.org> | 2009-09-29 13:11:20 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-09-29 13:51:43 +0200 |
commit | 0cf317f36f7582cb0540c74910020c9d5f4aa14f (patch) | |
tree | e5e46fd025976c2a6955d34435201969f1178b01 /source3/lua-5.1.4/etc/strict.lua | |
parent | 64e08fef16001d62b43f6925a26ad739391cface (diff) | |
download | samba-0cf317f36f7582cb0540c74910020c9d5f4aa14f.tar.gz samba-0cf317f36f7582cb0540c74910020c9d5f4aa14f.tar.bz2 samba-0cf317f36f7582cb0540c74910020c9d5f4aa14f.zip |
s3: Remove the lua interpreter again
This was meant to support async winbind. But as the hairy parts of async
winbind (getgrent) are done without it, it can go again.
Diffstat (limited to 'source3/lua-5.1.4/etc/strict.lua')
-rw-r--r-- | source3/lua-5.1.4/etc/strict.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/source3/lua-5.1.4/etc/strict.lua b/source3/lua-5.1.4/etc/strict.lua deleted file mode 100644 index 3ec2ab2ae5..0000000000 --- a/source3/lua-5.1.4/etc/strict.lua +++ /dev/null @@ -1,40 +0,0 @@ --- --- strict.lua --- checks uses of undeclared global variables --- All global variables must be 'declared' through a regular assignment --- (even assigning nil will do) in a main chunk before being used --- anywhere or assigned to inside a function. --- - -local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget - -local mt = getmetatable(_G) -if mt == nil then - mt = {} - setmetatable(_G, mt) -end - -mt.__declared = {} - -local function what () - local d = getinfo(3, "S") - return d and d.what or "C" -end - -mt.__newindex = function (t, n, v) - if not mt.__declared[n] then - local w = what() - if w ~= "main" and w ~= "C" then - error("assign to undeclared variable '"..n.."'", 2) - end - mt.__declared[n] = true - end - rawset(t, n, v) -end - -mt.__index = function (t, n) - if not mt.__declared[n] and what() ~= "C" then - error("variable '"..n.."' is not declared", 2) - end - return rawget(t, n) -end |