client: Stop using a_tokenize
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8e0cdc86fd
commit
bf3aa6d79e
|
@ -1688,17 +1688,11 @@ luaA_client_keys(lua_State *L)
|
||||||
static int
|
static int
|
||||||
luaA_client_module_index(lua_State *L)
|
luaA_client_module_index(lua_State *L)
|
||||||
{
|
{
|
||||||
size_t len;
|
const char *buf = luaL_checkstring(L, 2);
|
||||||
const char *buf = luaL_checklstring(L, 2, &len);
|
|
||||||
|
|
||||||
switch(a_tokenize(buf, len))
|
if(a_strcmp(buf, "focus") == 0)
|
||||||
{
|
|
||||||
case A_TK_FOCUS:
|
|
||||||
return luaA_object_push(globalconf.L, globalconf.client_focus);
|
return luaA_object_push(globalconf.L, globalconf.client_focus);
|
||||||
break;
|
return 0;
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Client module new index.
|
/* Client module new index.
|
||||||
|
@ -1708,18 +1702,13 @@ luaA_client_module_index(lua_State *L)
|
||||||
static int
|
static int
|
||||||
luaA_client_module_newindex(lua_State *L)
|
luaA_client_module_newindex(lua_State *L)
|
||||||
{
|
{
|
||||||
size_t len;
|
const char *buf = luaL_checkstring(L, 2);
|
||||||
const char *buf = luaL_checklstring(L, 2, &len);
|
|
||||||
client_t *c;
|
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);
|
c = luaA_checkudata(L, 3, &client_class);
|
||||||
client_focus(c);
|
client_focus(c);
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue