From 834a6089999993448c03dafed7e928ddbd9606ca Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 11 Apr 2009 14:17:46 +0200 Subject: [PATCH] otable: remove Signed-off-by: Julien Danjou --- lib/otable.lua.in | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 lib/otable.lua.in diff --git a/lib/otable.lua.in b/lib/otable.lua.in deleted file mode 100644 index a79a76d5..00000000 --- a/lib/otable.lua.in +++ /dev/null @@ -1,38 +0,0 @@ ----------------------------------------------------------------------------- --- @author Julien Danjou <julien@danjou.info> --- @copyright 2009 Julien Danjou --- @release @AWESOME_VERSION@ ----------------------------------------------------------------------------- - -local setmetatable = setmetatable -local pairs = pairs -local rawset = rawset - ---- Special object table -module("otable") - -local function newindex(t, k, v) - for tk, tv in pairs(t) do - if tk == k then - rawset(t, tk, v) - return - end - end - rawset(t, k, v) -end - -local function index(t, k) - for tk, tv in pairs(t) do - if tk == k then - return tv - end - end -end - -local function new() - return setmetatable({}, { __newindex = newindex, __index = index }) -end - -setmetatable(_M, { __call = new }) - --- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80