tasn pushed a commit to branch master.

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

commit e6886e05b1f6feb9c620720b35b568c5e84de872
Author: Tom Hacohen <t...@stosb.com>
Date:   Fri Sep 27 17:01:51 2013 +0100

    Eo: get rid of eo_class_do(_super) which we don't need anymore.
    
    We now completely use eo_do(_super), so those are not needed.
---
 src/lib/eo/Eo.h                                    | 20 ---------------
 .../function_overrides_inherit2.c                  |  4 +--
 .../function_overrides/function_overrides_main.c   | 10 ++++----
 .../function_overrides/function_overrides_simple.c |  4 +--
 src/tests/eo/signals/signals_main.c                | 30 +++++++++++-----------
 src/tests/eo/suite/eo_test_general.c               |  8 +++---
 6 files changed, 28 insertions(+), 48 deletions(-)

diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 55f910e..0e45fd0 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -605,13 +605,6 @@ EAPI Eina_Bool eo_shutdown(void);
 #define eo_vdo(obj, args) eo_vdo_internal(__FILE__, __LINE__, obj, args)
 
 /**
- * @def eo_class_do
- * A convenience wrapper around eo_class_do_internal()
- * @see eo_class_do_internal
- */
-#define eo_class_do(klass, ...) eo_do(klass, __VA_ARGS__)
-
-/**
  * @brief Calls op functions of an object
  * @param obj The object to work on
  * @param ... NULL terminated list of OPs and parameters.
@@ -652,19 +645,6 @@ EAPI Eina_Bool eo_vdo_internal(const char *file, int line, 
const Eo *obj, va_lis
 
 /**
  * @brief Calls the super function for the specific op.
- * @param klass The klass to work on
- * @param cur_klass The *current* class (use the class *after* this in the 
MRO).
- * @param ... list of parameters.
- * @return @c EINA_TRUE on success.
- *
- * Unlike eo_class_do(), this function only accepts one op.
- *
- * @see #eo_class_do
- */
-#define eo_class_do_super(klass, cur_klass, ...) eo_do_super(klass, cur_klass, 
__VA_ARGS__)
-
-/**
- * @brief Calls the super function for the specific op.
  * @param obj The object to work on
  * @param cur_klass The *current* class (use the class *after* this in the 
MRO).
  * @param op The wanted op.
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c 
b/src/tests/eo/function_overrides/function_overrides_inherit2.c
index 0092655..addf9fd 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit2.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit2.c
@@ -43,8 +43,8 @@ _class_print(Eo_Class *klass, void *data EINA_UNUSED, va_list 
*list)
 {
    (void) list;
    printf("Print %s-%s\n", eo_class_name_get(klass), 
eo_class_name_get(MY_CLASS));
-   fail_if(!eo_class_do_super(klass, MY_CLASS, simple_class_print()));
-   fail_if(!eo_class_do_super(klass, MY_CLASS, simple_class_print2()));
+   fail_if(!eo_do_super(klass, MY_CLASS, simple_class_print()));
+   fail_if(!eo_do_super(klass, MY_CLASS, simple_class_print2()));
 }
 
 static void
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c 
b/src/tests/eo/function_overrides/function_overrides_main.c
index c93e313..4210925 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -45,13 +45,13 @@ main(int argc, char *argv[])
    fail_if(eo_do(obj, simple_class_print()));
 #endif
 
-   fail_if(!eo_class_do(SIMPLE_CLASS, simple_class_print()));
-   fail_if(!eo_class_do(INHERIT_CLASS, simple_class_print()));
-   fail_if(!eo_class_do(INHERIT2_CLASS, simple_class_print()));
-   fail_if(!eo_class_do(INHERIT3_CLASS, simple_class_print()));
+   fail_if(!eo_do(SIMPLE_CLASS, simple_class_print()));
+   fail_if(!eo_do(INHERIT_CLASS, simple_class_print()));
+   fail_if(!eo_do(INHERIT2_CLASS, simple_class_print()));
+   fail_if(!eo_do(INHERIT3_CLASS, simple_class_print()));
 
 #ifdef EO_DEBUG
-   fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print()));
+   fail_if(eo_do(SIMPLE_CLASS, simple_a_print()));
 #endif
 
    eo_do_super(obj, SIMPLE_CLASS, eo_constructor());
diff --git a/src/tests/eo/function_overrides/function_overrides_simple.c 
b/src/tests/eo/function_overrides/function_overrides_simple.c
index ff1d5b3..afa4fef 100644
--- a/src/tests/eo/function_overrides/function_overrides_simple.c
+++ b/src/tests/eo/function_overrides/function_overrides_simple.c
@@ -34,8 +34,8 @@ _class_print(Eo_Class *klass, void *data EINA_UNUSED, va_list 
*list)
 {
    (void) list;
    printf("Print %s-%s\n", eo_class_name_get(klass), 
eo_class_name_get(MY_CLASS));
-   fail_if(eo_class_do_super(klass, MY_CLASS, simple_class_print()));
-   fail_if(eo_class_do_super(klass, MY_CLASS, simple_class_print2()));
+   fail_if(eo_do_super(klass, MY_CLASS, simple_class_print()));
+   fail_if(eo_do_super(klass, MY_CLASS, simple_class_print2()));
 }
 
 static void
diff --git a/src/tests/eo/signals/signals_main.c 
b/src/tests/eo/signals/signals_main.c
index 4ed09c9..7c7b786 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -133,15 +133,15 @@ main(int argc, char *argv[])
    eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, 
EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1));
    fail_if(pd->cb_count != 1);
 
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 0);
 
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 1);
 
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 2);
 
    eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, 
EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2));
@@ -149,30 +149,30 @@ main(int argc, char *argv[])
 
    eo_do(obj, simple_a_set(2));
    fail_if(cb_count != 0);
-   eo_class_do(EO_BASE_CLASS, eo_event_global_thaw());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_thaw());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 1);
 
-   eo_class_do(EO_BASE_CLASS, eo_event_global_thaw());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_thaw());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 0);
 
    eo_do(obj, simple_a_set(3));
    fail_if(cb_count != 2);
 
    cb_count = 0;
-   eo_class_do(EO_BASE_CLASS, eo_event_global_thaw());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_thaw());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 0);
 
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 1);
 
    eo_do(obj, simple_a_set(2));
    fail_if(cb_count != 0);
-   eo_class_do(EO_BASE_CLASS, eo_event_global_thaw());
-   eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
+   eo_do(EO_BASE_CLASS, eo_event_global_thaw());
+   eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
    fail_if(fcount != 0);
 
 
diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index 74e807b..ceeed24 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -670,9 +670,9 @@ START_TEST(eo_magic_checks)
         fail_if(eo_class_get((Eo *) buf));
         fail_if(eo_class_name_get((Eo_Class*) buf));
         eo_class_funcs_set((Eo_Class *) buf, NULL);
-        eo_class_do((Eo_Class *) buf, NULL);
-        eo_class_do_super((Eo_Class *) buf, SIMPLE_CLASS, EO_NOOP);
-        eo_class_do_super(SIMPLE_CLASS, (Eo_Class *) buf, EO_NOOP);
+        eo_do((Eo_Class *) buf, NULL);
+        eo_do_super((Eo_Class *) buf, SIMPLE_CLASS, EO_NOOP);
+        eo_do_super(SIMPLE_CLASS, (Eo_Class *) buf, EO_NOOP);
 
         fail_if(eo_class_new(NULL, (Eo_Class *) buf), NULL);
 
@@ -791,7 +791,7 @@ START_TEST(eo_multiple_do)
    fail_if(!obj);
 
    fail_if(!eo_do(obj, simple_a_print(), multi_a_print(), multi_a_print()));
-   fail_if(!eo_class_do(klass, simple_class_hi_print(), 
multi_class_hi_print(), multi_class_hi_print()));
+   fail_if(!eo_do(klass, simple_class_hi_print(), multi_class_hi_print(), 
multi_class_hi_print()));
 
    eo_unref(obj);
 

-- 


Reply via email to