From f111d0cab1c943a0f445accf1fc820643daf40bc Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 18 Aug 2009 18:11:42 +0200 Subject: [PATCH] luaclass: use signal_object_emit Signed-off-by: Julien Danjou --- common/luaclass.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/common/luaclass.c b/common/luaclass.c index 654f85a7..8be626d3 100644 --- a/common/luaclass.c +++ b/common/luaclass.c @@ -204,17 +204,7 @@ void luaA_class_emit_signal(lua_State *L, lua_class_t *lua_class, const char *name, int nargs) { - signal_t *sigfound = signal_array_getbyid(&lua_class->signals, - a_strhash((const unsigned char *) name)); - if(sigfound) - foreach(ref, sigfound->sigfuncs) - { - for(int i = 0; i < nargs; i++) - lua_pushvalue(L, - nargs); - luaA_object_push(L, (void *) *ref); - luaA_dofunction(L, nargs, 0); - } - lua_pop(L, nargs); + signal_object_emit(L, &lua_class->signals, name, nargs); } /** Try to use the metatable of an object.