From db4447af91e06cbe875fc656a65756751a1549e5 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 28 Jul 2008 14:17:30 +0000 Subject: [PATCH] libs/core: Renamed luci.util.create_dtable => luci.util.dtable --- libs/core/luasrc/util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.25.1