From 355383844392d3e80f3532e623a4be1a6ce8f6e6 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 21 Jul 2018 10:19:32 +0200 Subject: [PATCH] Fix function pointer casts in client.c The getters for properties already get the object as their second argument, so there is no need to get the object again from Lua. Fixes: https://github.com/awesomeWM/awesome/issues/2299 Signed-off-by: Uli Schlachter --- objects/client.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/objects/client.c b/objects/client.c index e1c82e2de..fe14041d4 100644 --- a/objects/client.c +++ b/objects/client.c @@ -2549,10 +2549,8 @@ luaA_client_tags(lua_State *L) /** Get the first tag of a client. */ static int -luaA_client_get_first_tag(lua_State *L) +luaA_client_get_first_tag(lua_State *L, client_t *c) { - client_t *c = luaA_checkudata(L, 1, &client_class); - foreach(tag, globalconf.tags) if(is_client_tagged(c, *tag)) { @@ -3441,10 +3439,9 @@ luaA_client_keys(lua_State *L) } static int -luaA_client_get_icon_sizes(lua_State *L) +luaA_client_get_icon_sizes(lua_State *L, client_t *c) { int index = 1; - client_t *c = luaA_checkudata(L, 1, &client_class); lua_newtable(L); foreach (s, c->icons) {