summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-09-27 17:01:51 +0100
committerTom Hacohen <tom@stosb.com>2013-09-27 17:01:51 +0100
commite6886e05b1f6feb9c620720b35b568c5e84de872 (patch)
tree3386a59fa3ce34dccb3f59e87b2904976fe05f7c /src
parent7ed7d7da8b8f7f969af806541a22be11e7b8477b (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eo/Eo.h20
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit2.c4
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c10
-rw-r--r--src/tests/eo/function_overrides/function_overrides_simple.c4
-rw-r--r--src/tests/eo/signals/signals_main.c30
-rw-r--r--src/tests/eo/suite/eo_test_general.c8
6 files changed, 28 insertions, 48 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 55f910e1fa..0e45fd06f6 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -605,13 +605,6 @@ EAPI Eina_Bool eo_shutdown(void);
605#define eo_vdo(obj, args) eo_vdo_internal(__FILE__, __LINE__, obj, args) 605#define eo_vdo(obj, args) eo_vdo_internal(__FILE__, __LINE__, obj, args)
606 606
607/** 607/**
608 * @def eo_class_do
609 * A convenience wrapper around eo_class_do_internal()
610 * @see eo_class_do_internal
611 */
612#define eo_class_do(klass, ...) eo_do(klass, __VA_ARGS__)
613
614/**
615 * @brief Calls op functions of an object 608 * @brief Calls op functions of an object
616 * @param obj The object to work on 609 * @param obj The object to work on
617 * @param ... NULL terminated list of OPs and parameters. 610 * @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
652 645
653/** 646/**
654 * @brief Calls the super function for the specific op. 647 * @brief Calls the super function for the specific op.
655 * @param klass The klass to work on
656 * @param cur_klass The *current* class (use the class *after* this in the MRO).
657 * @param ... list of parameters.
658 * @return @c EINA_TRUE on success.
659 *
660 * Unlike eo_class_do(), this function only accepts one op.
661 *
662 * @see #eo_class_do
663 */
664#define eo_class_do_super(klass, cur_klass, ...) eo_do_super(klass, cur_klass, __VA_ARGS__)
665
666/**
667 * @brief Calls the super function for the specific op.
668 * @param obj The object to work on 648 * @param obj The object to work on
669 * @param cur_klass The *current* class (use the class *after* this in the MRO). 649 * @param cur_klass The *current* class (use the class *after* this in the MRO).
670 * @param op The wanted op. 650 * @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 0092655dfa..addf9fdd43 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)
43{ 43{
44 (void) list; 44 (void) list;
45 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 45 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS));
46 fail_if(!eo_class_do_super(klass, MY_CLASS, simple_class_print())); 46 fail_if(!eo_do_super(klass, MY_CLASS, simple_class_print()));
47 fail_if(!eo_class_do_super(klass, MY_CLASS, simple_class_print2())); 47 fail_if(!eo_do_super(klass, MY_CLASS, simple_class_print2()));
48} 48}
49 49
50static void 50static void
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index c93e3130e1..4210925dfe 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[])
45 fail_if(eo_do(obj, simple_class_print())); 45 fail_if(eo_do(obj, simple_class_print()));
46#endif 46#endif
47 47
48 fail_if(!eo_class_do(SIMPLE_CLASS, simple_class_print())); 48 fail_if(!eo_do(SIMPLE_CLASS, simple_class_print()));
49 fail_if(!eo_class_do(INHERIT_CLASS, simple_class_print())); 49 fail_if(!eo_do(INHERIT_CLASS, simple_class_print()));
50 fail_if(!eo_class_do(INHERIT2_CLASS, simple_class_print())); 50 fail_if(!eo_do(INHERIT2_CLASS, simple_class_print()));
51 fail_if(!eo_class_do(INHERIT3_CLASS, simple_class_print())); 51 fail_if(!eo_do(INHERIT3_CLASS, simple_class_print()));
52 52
53#ifdef EO_DEBUG 53#ifdef EO_DEBUG
54 fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print())); 54 fail_if(eo_do(SIMPLE_CLASS, simple_a_print()));
55#endif 55#endif
56 56
57 eo_do_super(obj, SIMPLE_CLASS, eo_constructor()); 57 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 ff1d5b3bc3..afa4fef9fb 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)
34{ 34{
35 (void) list; 35 (void) list;
36 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 36 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS));
37 fail_if(eo_class_do_super(klass, MY_CLASS, simple_class_print())); 37 fail_if(eo_do_super(klass, MY_CLASS, simple_class_print()));
38 fail_if(eo_class_do_super(klass, MY_CLASS, simple_class_print2())); 38 fail_if(eo_do_super(klass, MY_CLASS, simple_class_print2()));
39} 39}
40 40
41static void 41static void
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index 4ed09c9654..7c7b786977 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[])
133 eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1)); 133 eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1));
134 fail_if(pd->cb_count != 1); 134 fail_if(pd->cb_count != 1);
135 135
136 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 136 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
137 fail_if(fcount != 0); 137 fail_if(fcount != 0);
138 138
139 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); 139 eo_do(EO_BASE_CLASS, eo_event_global_freeze());
140 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 140 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
141 fail_if(fcount != 1); 141 fail_if(fcount != 1);
142 142
143 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); 143 eo_do(EO_BASE_CLASS, eo_event_global_freeze());
144 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 144 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
145 fail_if(fcount != 2); 145 fail_if(fcount != 2);
146 146
147 eo_do(obj, eo_event_callback_priority_add(EV_A_CHANGED, EO_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2)); 147 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[])
149 149
150 eo_do(obj, simple_a_set(2)); 150 eo_do(obj, simple_a_set(2));
151 fail_if(cb_count != 0); 151 fail_if(cb_count != 0);
152 eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); 152 eo_do(EO_BASE_CLASS, eo_event_global_thaw());
153 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 153 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
154 fail_if(fcount != 1); 154 fail_if(fcount != 1);
155 155
156 eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); 156 eo_do(EO_BASE_CLASS, eo_event_global_thaw());
157 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 157 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
158 fail_if(fcount != 0); 158 fail_if(fcount != 0);
159 159
160 eo_do(obj, simple_a_set(3)); 160 eo_do(obj, simple_a_set(3));
161 fail_if(cb_count != 2); 161 fail_if(cb_count != 2);
162 162
163 cb_count = 0; 163 cb_count = 0;
164 eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); 164 eo_do(EO_BASE_CLASS, eo_event_global_thaw());
165 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 165 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
166 fail_if(fcount != 0); 166 fail_if(fcount != 0);
167 167
168 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze()); 168 eo_do(EO_BASE_CLASS, eo_event_global_freeze());
169 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 169 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
170 fail_if(fcount != 1); 170 fail_if(fcount != 1);
171 171
172 eo_do(obj, simple_a_set(2)); 172 eo_do(obj, simple_a_set(2));
173 fail_if(cb_count != 0); 173 fail_if(cb_count != 0);
174 eo_class_do(EO_BASE_CLASS, eo_event_global_thaw()); 174 eo_do(EO_BASE_CLASS, eo_event_global_thaw());
175 eo_class_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount)); 175 eo_do(EO_BASE_CLASS, eo_event_global_freeze_get(&fcount));
176 fail_if(fcount != 0); 176 fail_if(fcount != 0);
177 177
178 178
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 74e807bef8..ceeed24286 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)
670 fail_if(eo_class_get((Eo *) buf)); 670 fail_if(eo_class_get((Eo *) buf));
671 fail_if(eo_class_name_get((Eo_Class*) buf)); 671 fail_if(eo_class_name_get((Eo_Class*) buf));
672 eo_class_funcs_set((Eo_Class *) buf, NULL); 672 eo_class_funcs_set((Eo_Class *) buf, NULL);
673 eo_class_do((Eo_Class *) buf, NULL); 673 eo_do((Eo_Class *) buf, NULL);
674 eo_class_do_super((Eo_Class *) buf, SIMPLE_CLASS, EO_NOOP); 674 eo_do_super((Eo_Class *) buf, SIMPLE_CLASS, EO_NOOP);
675 eo_class_do_super(SIMPLE_CLASS, (Eo_Class *) buf, EO_NOOP); 675 eo_do_super(SIMPLE_CLASS, (Eo_Class *) buf, EO_NOOP);
676 676
677 fail_if(eo_class_new(NULL, (Eo_Class *) buf), NULL); 677 fail_if(eo_class_new(NULL, (Eo_Class *) buf), NULL);
678 678
@@ -791,7 +791,7 @@ START_TEST(eo_multiple_do)
791 fail_if(!obj); 791 fail_if(!obj);
792 792
793 fail_if(!eo_do(obj, simple_a_print(), multi_a_print(), multi_a_print())); 793 fail_if(!eo_do(obj, simple_a_print(), multi_a_print(), multi_a_print()));
794 fail_if(!eo_class_do(klass, simple_class_hi_print(), multi_class_hi_print(), multi_class_hi_print())); 794 fail_if(!eo_do(klass, simple_class_hi_print(), multi_class_hi_print(), multi_class_hi_print()));
795 795
796 eo_unref(obj); 796 eo_unref(obj);
797 797