From: Steven Barth Date: Mon, 28 Jul 2008 14:17:30 +0000 (+0000) Subject: libs/core: Renamed luci.util.create_dtable => luci.util.dtable X-Git-Tag: 0.8.0~561 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db4447af91e06cbe875fc656a65756751a1549e5;p=oweals%2Fluci.git libs/core: Renamed luci.util.create_dtable => luci.util.dtable --- diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua index 22f295d23..bcd4ed1e0 100644 --- a/libs/core/luasrc/util.lua +++ b/libs/core/luasrc/util.lua @@ -378,11 +378,11 @@ end --- Create a dynamic table which automatically creates subtables. -- @return Dynamic Table -function create_dtable() +function dtable() return setmetatable({}, { __index = function(tbl, key) return rawget(tbl, key) - or rawget(rawset(tbl, key, create_dtable()), key) + or rawget(rawset(tbl, key, dtable()), key) end }) end