From bf3aa6d79e7d839f39ab543028eca569456e0162 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 2 Sep 2010 19:13:27 +0200 Subject: [PATCH] client: Stop using a_tokenize Signed-off-by: Uli Schlachter --- objects/client.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/objects/client.c b/objects/client.c index dc51cdc5..04cac604 100644 --- a/objects/client.c +++ b/objects/client.c @@ -1688,17 +1688,11 @@ luaA_client_keys(lua_State *L) static int luaA_client_module_index(lua_State *L) { - size_t len; - const char *buf = luaL_checklstring(L, 2, &len); + const char *buf = luaL_checkstring(L, 2); - switch(a_tokenize(buf, len)) - { - case A_TK_FOCUS: + if(a_strcmp(buf, "focus") == 0) return luaA_object_push(globalconf.L, globalconf.client_focus); - break; - default: - return 0; - } + return 0; } /* Client module new index. @@ -1708,18 +1702,13 @@ luaA_client_module_index(lua_State *L) static int luaA_client_module_newindex(lua_State *L) { - size_t len; - const char *buf = luaL_checklstring(L, 2, &len); + const char *buf = luaL_checkstring(L, 2); client_t *c; - switch(a_tokenize(buf, len)) + if(a_strcmp(buf, "focus") == 0) { - case A_TK_FOCUS: c = luaA_checkudata(L, 3, &client_class); client_focus(c); - break; - default: - break; } return 0;