From 3d4eeb80ece1fa1f03144fac6f165f74fa779371 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 14 Sep 2009 15:06:15 +0200 Subject: [PATCH] key: remove deprecated code Signed-off-by: Julien Danjou --- key.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/key.c b/key.c index 7d7032c32..24cbd503e 100644 --- a/key.c +++ b/key.c @@ -970,48 +970,6 @@ luaA_keystore(lua_State *L, int ud, const char *str, ssize_t len) static int luaA_key_new(lua_State *L) { - size_t len; - keyb_t *k; - const char *key; - - /* compat code */ - if(lua_istable(L, 2) && lua_isstring(L, 3)) - { - luaA_deprecate(L, "new syntax"); - - /* be sure there's 5 arguments */ - lua_settop(L, 5); - - /* arg 2 is key mod table */ - luaA_checktable(L, 2); - /* arg 3 is key */ - key = luaL_checklstring(L, 3, &len); - - if(!lua_isnil(L, 4)) - luaA_checkfunction(L, 4); - - if(!lua_isnil(L, 5)) - luaA_checkfunction(L, 5); - - k = key_new(L); - luaA_keystore(L, -1, key, len); - k->modifiers = luaA_tomodifiers(L, 2); - - if(!lua_isnil(L, 4)) - { - lua_pushvalue(L, 4); - luaA_object_add_signal(L, -2, "press", -1); - } - - if(!lua_isnil(L, 5)) - { - lua_pushvalue(L, 5); - luaA_object_add_signal(L, -2, "release", -1); - } - - return 1; - } - return luaA_class_new(L, &key_class); }