Eobj: Make eobj_event_callback_add a macro.
authortasn <tasn>
Sun, 15 Apr 2012 08:57:20 +0000 (08:57 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 15 Apr 2012 08:57:20 +0000 (08:57 +0000)
Thanks to raster for the tip.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@70193 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

lib/Eobj.h
lib/eobj.c

index c0cd68d..6679502 100644 (file)
@@ -150,7 +150,9 @@ EAPI Eina_Bool eobj_event_callback_forwarder_add(Eobj *obj, const Eobj_Event_Des
 EAPI Eina_Bool eobj_event_callback_forwarder_del(Eobj *obj, const Eobj_Event_Description *desc, Eobj *new_obj);
 
 /* callbacks of the same priority are called in reverse order of creation. */
-EAPI Eina_Bool eobj_event_callback_add(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb cb, const void *data);
+#define eobj_event_callback_add(obj, desc, cb, data) \
+   eobj_event_callback_priority_add(obj, desc, \
+         EOBJ_CALLBACK_PRIORITY_DEFAULT, cb, data)
 EAPI Eina_Bool eobj_event_callback_priority_add(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Callback_Priority priority, Eobj_Event_Cb cb, const void *data);
 EAPI void *eobj_event_callback_del(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb func);
 EAPI void *eobj_event_callback_del_full(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb func, const void *user_data);
index cc63442..9722684 100644 (file)
@@ -1121,16 +1121,6 @@ _callback_priority_cmp(const void *_a, const void *_b)
 }
 
 EAPI Eina_Bool
-eobj_event_callback_add(Eobj *obj,
-      const Eobj_Event_Description *desc,
-      Eobj_Event_Cb cb,
-      const void *data)
-{
-   return eobj_event_callback_priority_add(obj, desc,
-         EOBJ_CALLBACK_PRIORITY_DEFAULT, cb, data);
-}
-
-EAPI Eina_Bool
 eobj_event_callback_priority_add(Eobj *obj,
       const Eobj_Event_Description *desc,
       Eobj_Callback_Priority priority,