From db0d5b33d04550a1e81a8ea8662f1a2d1305228d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Apr 2018 13:20:42 +0200 Subject: [PATCH 1/1] luci-base: drop luci.util.dtable() The dtable() function has no user in the entire LuCI repo, so drop it. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/util.lua | 10 ---------- modules/luci-base/luasrc/util.luadoc | 8 -------- 2 files changed, 18 deletions(-) diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua index 36bbaaf47..f47d3e53a 100644 --- a/modules/luci-base/luasrc/util.lua +++ b/modules/luci-base/luasrc/util.lua @@ -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.") diff --git a/modules/luci-base/luasrc/util.luadoc b/modules/luci-base/luasrc/util.luadoc index 19c8010df..c4f28d039 100644 --- a/modules/luci-base/luasrc/util.luadoc +++ b/modules/luci-base/luasrc/util.luadoc @@ -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(). -- 2.11.0