From 5f41c7a23857cc52ea09b657cf190ff7ef02fdcc Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 7 Mar 2010 04:10:57 +0100 Subject: init: do not use keyword type for user data --- init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index b4f38f3..ec291c8 100644 --- a/init.lua +++ b/init.lua @@ -93,16 +93,16 @@ local function update(widget, reg, disablecache) local data = {} -- Check for chached output newer than the last update - if widget_cache[reg.type] ~= nil then - local c = widget_cache[reg.type] + if widget_cache[reg.wtype] ~= nil then + local c = widget_cache[reg.wtype] if (c.time == nil or c.time <= t-reg.timer) or disablecache then - c.time, c.data = t, reg.type(reg.format, reg.warg) + c.time, c.data = t, reg.wtype(reg.format, reg.warg) end data = c.data else - data = reg.type(reg.format, reg.warg) + data = reg.wtype(reg.format, reg.warg) end if type(data) == "table" then @@ -179,7 +179,7 @@ function register(widget, wtype, format, timer, warg) local widget = widget -- Set properties - reg.type = wtype + reg.wtype = wtype reg.format = format reg.timer = timer reg.warg = warg @@ -240,9 +240,9 @@ end -- }}} -- {{{ Enable caching of a widget type -function cache(type) - if widget_cache[type] == nil then - widget_cache[type] = {} +function cache(wtype) + if widget_cache[wtype] == nil then + widget_cache[wtype] = {} end end -- }}} -- cgit v1.2.3