From 62346a75a91a25ce355811659e638b84160050e6 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 15 Feb 2015 10:52:35 +0100 Subject: [PATCH] awful.util.deprecate: do not use glib.String() for the hash This works around a crash and is not really required. Fixes https://github.com/awesomeWM/awesome/issues/127. --- lib/awful/util.lua.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 955c3f38..4e765805 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -17,7 +17,6 @@ local type = type local rtable = table local pairs = pairs local string = string -local glib = require("lgi").GLib local capi = { awesome = awesome, @@ -36,11 +35,10 @@ local displayed_deprecations = {} -- @param see Optional message to a new method / function to use. function util.deprecate(see) local tb = debug.traceback() - local tbhash = glib.String():append(tb):hash() - if displayed_deprecations[tbhash] then + if displayed_deprecations[tb] then return end - displayed_deprecations[tbhash] = true + displayed_deprecations[tb] = true io.stderr:write("W: awful: function is deprecated") if see then io.stderr:write(", see " .. see)