Also rename the signal_* C function
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8a5f59a31c
commit
948f960b7e
|
@ -259,7 +259,7 @@ luaA_class_connect_signal_from_stack(lua_State *L, lua_class_t *lua_class,
|
|||
const char *name, int ud)
|
||||
{
|
||||
luaA_checkfunction(L, ud);
|
||||
signal_add(&lua_class->signals, name, luaA_object_ref(L, ud));
|
||||
signal_connect(&lua_class->signals, name, luaA_object_ref(L, ud));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -268,7 +268,7 @@ luaA_class_disconnect_signal_from_stack(lua_State *L, lua_class_t *lua_class,
|
|||
{
|
||||
luaA_checkfunction(L, ud);
|
||||
void *ref = (void *) lua_topointer(L, ud);
|
||||
signal_remove(&lua_class->signals, name, ref);
|
||||
signal_disconnect(&lua_class->signals, name, ref);
|
||||
luaA_object_unref(L, (void *) ref);
|
||||
lua_remove(L, ud);
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ luaA_object_connect_signal_from_stack(lua_State *L, int oud,
|
|||
{
|
||||
luaA_checkfunction(L, ud);
|
||||
lua_object_t *obj = lua_touserdata(L, oud);
|
||||
signal_add(&obj->signals, name, luaA_object_ref_item(L, oud, ud));
|
||||
signal_connect(&obj->signals, name, luaA_object_ref_item(L, oud, ud));
|
||||
}
|
||||
|
||||
/** Remove a signal to an object.
|
||||
|
@ -192,7 +192,7 @@ luaA_object_disconnect_signal_from_stack(lua_State *L, int oud,
|
|||
luaA_checkfunction(L, ud);
|
||||
lua_object_t *obj = lua_touserdata(L, oud);
|
||||
void *ref = (void *) lua_topointer(L, ud);
|
||||
signal_remove(&obj->signals, name, ref);
|
||||
signal_disconnect(&obj->signals, name, ref);
|
||||
luaA_object_unref_item(L, oud, ref);
|
||||
lua_remove(L, ud);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ signal_array_getbyid(signal_array_t *arr, unsigned long id)
|
|||
* \param ref The reference to add.
|
||||
*/
|
||||
static inline void
|
||||
signal_add(signal_array_t *arr, const char *name, const void *ref)
|
||||
signal_connect(signal_array_t *arr, const char *name, const void *ref)
|
||||
{
|
||||
unsigned long tok = a_strhash((const unsigned char *) name);
|
||||
signal_t *sigfound = signal_array_getbyid(arr, tok);
|
||||
|
@ -83,7 +83,7 @@ signal_add(signal_array_t *arr, const char *name, const void *ref)
|
|||
* \param ref The reference to remove.
|
||||
*/
|
||||
static inline void
|
||||
signal_remove(signal_array_t *arr, const char *name, const void *ref)
|
||||
signal_disconnect(signal_array_t *arr, const char *name, const void *ref)
|
||||
{
|
||||
signal_t *sigfound = signal_array_getbyid(arr,
|
||||
a_strhash((const unsigned char *) name));
|
||||
|
|
4
dbus.c
4
dbus.c
|
@ -763,7 +763,7 @@ luaA_dbus_connect_signal(lua_State *L)
|
|||
if(sig)
|
||||
luaA_warn(L, "cannot add signal %s on D-Bus, already existing", name);
|
||||
else
|
||||
signal_add(&dbus_signals, name, luaA_object_ref(L, 2));
|
||||
signal_connect(&dbus_signals, name, luaA_object_ref(L, 2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -780,7 +780,7 @@ luaA_dbus_disconnect_signal(lua_State *L)
|
|||
const char *name = luaL_checkstring(L, 1);
|
||||
luaA_checkfunction(L, 2);
|
||||
const void *func = lua_topointer(L, 2);
|
||||
signal_remove(&dbus_signals, name, func);
|
||||
signal_disconnect(&dbus_signals, name, func);
|
||||
luaA_object_unref(L, (void *) func);
|
||||
return 0;
|
||||
}
|
||||
|
|
4
luaa.c
4
luaa.c
|
@ -618,7 +618,7 @@ luaA_awesome_connect_signal(lua_State *L)
|
|||
{
|
||||
const char *name = luaL_checkstring(L, 1);
|
||||
luaA_checkfunction(L, 2);
|
||||
signal_add(&global_signals, name, luaA_object_ref(L, 2));
|
||||
signal_connect(&global_signals, name, luaA_object_ref(L, 2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ luaA_awesome_disconnect_signal(lua_State *L)
|
|||
const char *name = luaL_checkstring(L, 1);
|
||||
luaA_checkfunction(L, 2);
|
||||
const void *func = lua_topointer(L, 2);
|
||||
signal_remove(&global_signals, name, func);
|
||||
signal_disconnect(&global_signals, name, func);
|
||||
luaA_object_unref(L, (void *) func);
|
||||
return 0;
|
||||
}
|
||||
|
|
4
screen.c
4
screen.c
|
@ -543,7 +543,7 @@ luaA_screen_connect_signal(lua_State *L)
|
|||
screen_t *s = lua_touserdata(L, 1);
|
||||
const char *name = luaL_checkstring(L, 2);
|
||||
luaA_checkfunction(L, 3);
|
||||
signal_add(&s->signals, name, luaA_object_ref(L, 3));
|
||||
signal_connect(&s->signals, name, luaA_object_ref(L, 3));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -562,7 +562,7 @@ luaA_screen_disconnect_signal(lua_State *L)
|
|||
const char *name = luaL_checkstring(L, 2);
|
||||
luaA_checkfunction(L, 3);
|
||||
const void *ref = lua_topointer(L, 3);
|
||||
signal_remove(&s->signals, name, ref);
|
||||
signal_disconnect(&s->signals, name, ref);
|
||||
luaA_object_unref(L, (void *) ref);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue