luci-base: drop luci.util.dtable()
authorJo-Philipp Wich <jo@mein.io>
Wed, 18 Apr 2018 11:20:42 +0000 (13:20 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 18 Apr 2018 14:21:27 +0000 (16:21 +0200)
The dtable() function has no user in the entire LuCI repo, so drop it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/util.lua
modules/luci-base/luasrc/util.luadoc

index 36bbaaf..f47d3e5 100644 (file)
@@ -407,16 +407,6 @@ function clone(object, deep)
 end
 
 
-function dtable()
-        return setmetatable({}, { __index =
-                function(tbl, key)
-                        return rawget(tbl, key)
-                         or rawget(rawset(tbl, key, dtable()), key)
-                end
-        })
-end
-
-
 -- Serialize the contents of a table value.
 function _serialize_table(t, seen)
        assert(not seen[t], "Recursion detected.")
index 19c8010..c4f28d0 100644 (file)
@@ -256,14 +256,6 @@ Clones the given object and return it's copy.
 ]]
 
 ---[[
-Create a dynamic table which automatically creates subtables.
-
-@class                         function
-@name                          dtable
-@return                                Dynamic Table
-]]
-
----[[
 Recursively serialize given data to lua code, suitable for restoring
 with loadstring().