tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=da37a41fd1cb861df56862a2e0d88e8ff4b2cb59

commit da37a41fd1cb861df56862a2e0d88e8ff4b2cb59
Author: Tom Hacohen <t...@stosb.com>
Date:   Mon Mar 14 17:19:58 2016 +0000

    Eo: Move generation of Eo_Event_Cb to Eolian.
    
    This fixes the type redefinition warning (apparently it's C11).
    
    Thanks to bu5hm4n for reporting this.
---
 src/lib/eo/Eo.h       | 13 -------------
 src/lib/eo/eo_base.eo | 21 +++++++++++----------
 2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 387f187..4ac541f 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -153,19 +153,6 @@ enum _Eo_Op_Type
  */
 typedef enum _Eo_Op_Type Eo_Op_Type;
 
-/** This has to be duplicated here because Eolian doesn't support event 
callbacks. */
-typedef struct _Eo_Event Eo_Event;
-/**
- * @typedef Eo_Event_Cb
- *
- * An event callback prototype.
- *
- * @param data The user data registered with the callback.
- * @param event the object's event structure and information. @see Eo_Event
- * @return #EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, #EO_CALLBACK_CONTINUE to continue.
- */
-typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event *event);
-
 /**
  * @typedef Eo_Del_Intercept
  *
diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo
index 8a31a35..aa952c0 100644
--- a/src/lib/eo/eo_base.eo
+++ b/src/lib/eo/eo_base.eo
@@ -1,8 +1,5 @@
 import eina_types;
 
-/* Event callbacks are a special case and have to be external as eolian 
doesn't support function pointers. */
-type @extern Eo.Event_Cb: __builtin_event_cb;
-
 struct Eo.Event_Description {
     [[This struct holds the description of a specific event.]]
     name: const(char) *; [[name of the event.]]
@@ -10,6 +7,17 @@ struct Eo.Event_Description {
     legacy_is: bool; [[Internal use: if is a legacy event.]]
 }
 
+struct Eo.Event {
+     [[Parameter passed in event callbacks holding extra event parameters]]
+     obj: Eo.Base *; [[The object the event was called on.]]
+     desc: const(Eo.Event_Description) *; [[The event description.]]
+     event_info: void *; [[Extra event information passed by the event 
caller.]]
+}
+
+type Eo.Event_Cb: __builtin_event_cb; [[An event callback prototype.
+    return $EO_CALLBACK_STOP to stop calling additional callbacks for the 
event, $EO_CALLBACK_CONTINUE to continue.]]
+
+
 struct Eo.Callback_Array_Item {
     [[An item in an array of callback desc/func.
 
@@ -34,13 +42,6 @@ type Eo.Callback_Priority: short; [[Callback priority value. 
Range is -32k - 32k
                                     \@ref EO_CALLBACK_PRIORITY_DEFAULT
                                   ]]
 
-struct Eo.Event {
-     [[Parameter passed in event callbacks holding extra event parameters]]
-     obj: Eo.Base *; [[The object the event was called on.]]
-     desc: const(Eo.Event_Description) *; [[The event description.]]
-     event_info: void *; [[Extra event information passed by the event 
caller.]]
-}
-
 abstract Eo.Base ()
 {
    eo_prefix: eo;

-- 


Reply via email to