init: stop allocating reg table functions with properties

This partly reverts commit f1844decef because a user reported seeing
nil passed as the object to the reg.update() function.
This commit is contained in:
Adrian C. (anrxc) 2013-12-15 18:34:55 +01:00
parent 52cbb64144
commit c51e13c35d
1 changed files with 4 additions and 5 deletions

View File

@ -152,12 +152,11 @@ function vicious.register(widget, wtype, format, timer, warg)
timer = timer,
warg = warg,
widget = widget,
-- Update function
update = function ()
update(widget, reg)
end,
}
-- Set functions
reg.update = function ()
update(widget, reg)
end
-- Default to 2s timer
if reg.timer == nil then