summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-09 18:45:27 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-13 16:59:58 +0100
commit37d2d378ec2e2d1f9a3941372ef4d818996291c7 (patch)
treee100879fbdc9ce0d2ce810be81977be97125603b /src/tests/eo
parent3b2a5a429be16e5b8e5d322b7a077a2c849586b8 (diff)
eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which enabled those functions to be overwritten in classes inheriting another class. However in task T7675 we decided that this is not really good for bindings, as most OOP languages do not support this sort of feature. After this commit eolian realizes class function completly outside of the vtable, the c-symbol that is the class funciton is now just directly redirecting to a implementation, without the involvement of the vtable. This also means a change to the syntax created by eo: Calling before: class_function(CLASS_A); Calling after: class_function(); Implementation before: class_function(const Eo *obj, void *pd) { ... } Implementation after: class_function(void) { ... } This fixes T7675. Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br> Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Differential Revision: https://phab.enlightenment.org/D7901
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/signals/signals_main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index 58b9eda958..c3b1648c17 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -171,15 +171,15 @@ main(int argc, char *argv[])
171 efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1); 171 efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 1);
172 fail_if(pd->cb_count != 1); 172 fail_if(pd->cb_count != 1);
173 173
174 fcount = efl_event_global_freeze_count_get(EO_CLASS); 174 fcount = efl_event_global_freeze_count_get();
175 fail_if(fcount != 0); 175 fail_if(fcount != 0);
176 176
177 efl_event_global_freeze(EO_CLASS); 177 efl_event_global_freeze();
178 fcount = efl_event_global_freeze_count_get(EO_CLASS); 178 fcount = efl_event_global_freeze_count_get();
179 fail_if(fcount != 1); 179 fail_if(fcount != 1);
180 180
181 efl_event_global_freeze(EO_CLASS); 181 efl_event_global_freeze();
182 fcount = efl_event_global_freeze_count_get(EO_CLASS); 182 fcount = efl_event_global_freeze_count_get();
183 fail_if(fcount != 2); 183 fail_if(fcount != 2);
184 184
185 efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2); 185 efl_event_callback_priority_add(obj, EV_A_CHANGED, EFL_CALLBACK_PRIORITY_BEFORE, _a_changed_cb, (void *) 2);
@@ -187,30 +187,30 @@ main(int argc, char *argv[])
187 187
188 simple_a_set(obj, 2); 188 simple_a_set(obj, 2);
189 fail_if(cb_count != 0); 189 fail_if(cb_count != 0);
190 efl_event_global_thaw(EO_CLASS); 190 efl_event_global_thaw();
191 fcount = efl_event_global_freeze_count_get(EO_CLASS); 191 fcount = efl_event_global_freeze_count_get();
192 fail_if(fcount != 1); 192 fail_if(fcount != 1);
193 193
194 efl_event_global_thaw(EO_CLASS); 194 efl_event_global_thaw();
195 fcount = efl_event_global_freeze_count_get(EO_CLASS); 195 fcount = efl_event_global_freeze_count_get();
196 fail_if(fcount != 0); 196 fail_if(fcount != 0);
197 197
198 simple_a_set(obj, 3); 198 simple_a_set(obj, 3);
199 fail_if(cb_count != 2); 199 fail_if(cb_count != 2);
200 200
201 cb_count = 0; 201 cb_count = 0;
202 efl_event_global_thaw(EO_CLASS); 202 efl_event_global_thaw();
203 fcount = efl_event_global_freeze_count_get(EO_CLASS); 203 fcount = efl_event_global_freeze_count_get();
204 fail_if(fcount != 0); 204 fail_if(fcount != 0);
205 205
206 efl_event_global_freeze(EO_CLASS); 206 efl_event_global_freeze();
207 fcount = efl_event_global_freeze_count_get(EO_CLASS); 207 fcount = efl_event_global_freeze_count_get();
208 fail_if(fcount != 1); 208 fail_if(fcount != 1);
209 209
210 simple_a_set(obj, 2); 210 simple_a_set(obj, 2);
211 fail_if(cb_count != 0); 211 fail_if(cb_count != 0);
212 efl_event_global_thaw(EO_CLASS); 212 efl_event_global_thaw();
213 fcount = efl_event_global_freeze_count_get(EO_CLASS); 213 fcount = efl_event_global_freeze_count_get();
214 fail_if(fcount != 0); 214 fail_if(fcount != 0);
215 215
216 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL); 216 efl_event_callback_priority_add(obj, EV_RESTART, EFL_CALLBACK_PRIORITY_DEFAULT, _restart_1_cb, NULL);