diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 1b4ad779..51b543f3 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -17,6 +17,7 @@ local type = type local rtable = table local pairs = pairs local string = string +local glib = require("lgi").GLib local capi = { awesome = awesome, @@ -35,16 +36,16 @@ local displayed_deprecations = {} -- @param see Optional message to a new method / function to use. function util.deprecate(see) local tb = debug.traceback() - if util.table.hasitem(displayed_deprecations, tb) then + local tbhash = glib.String():append(tb):hash() + if displayed_deprecations[tbhash] then return end - table.insert(displayed_deprecations, tb) + displayed_deprecations[tbhash] = true io.stderr:write("W: awful: function is deprecated") if see then io.stderr:write(", see " .. see) end - io.stderr:write("\n") - io.stderr:write(tb) + io.stderr:write("\n" .. tb .. "\n") end --- Strip alpha part of color.