luaclass: use signal_object_emit

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-18 18:11:42 +02:00
parent 3105663933
commit f111d0cab1
1 changed files with 1 additions and 11 deletions

View File

@ -204,17 +204,7 @@ void
luaA_class_emit_signal(lua_State *L, lua_class_t *lua_class, luaA_class_emit_signal(lua_State *L, lua_class_t *lua_class,
const char *name, int nargs) const char *name, int nargs)
{ {
signal_t *sigfound = signal_array_getbyid(&lua_class->signals, signal_object_emit(L, &lua_class->signals, name, nargs);
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);
} }
/** Try to use the metatable of an object. /** Try to use the metatable of an object.