From 9621add2918cc4943e6693b74ae85d51dd264fcf Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 21 Apr 2014 20:59:39 +1000 Subject: We don't need the testlua directory any more. --- LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua (limited to 'LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua') diff --git a/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua b/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua deleted file mode 100644 index 85c0b4e..0000000 --- a/LuaSL/testLua/yueliang-0.4.1/test_lua/5.0/readonly.lua +++ /dev/null @@ -1,12 +0,0 @@ --- make global variables readonly - -local f=function (t,i) error("cannot redefine global variable `"..i.."'",2) end -local g={} -local G=getfenv() -setmetatable(g,{__index=G,__newindex=f}) -setfenv(1,g) - --- an example -rawset(g,"x",3) -x=2 -y=1 -- cannot redefine `y' -- cgit v1.1