summaryrefslogtreecommitdiff
path: root/src/tests/eolian/data/owning.eo.c
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/eolian/data/owning.eo.c
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/eolian/data/owning.eo.c')
-rw-r--r--src/tests/eolian/data/owning.eo.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tests/eolian/data/owning.eo.c b/src/tests/eolian/data/owning.eo.c
index 8712993c9b..bf7e78bf9f 100644
--- a/src/tests/eolian/data/owning.eo.c
+++ b/src/tests/eolian/data/owning.eo.c
@@ -43,7 +43,7 @@ EOAPI EFL_VOID_FUNC_BODYV_FALLBACK(owning_test2, _owning_test2_ownership_fallbac
43static Eina_Bool 43static Eina_Bool
44_owning_class_initializer(Efl_Class *klass) 44_owning_class_initializer(Efl_Class *klass)
45{ 45{
46 const Efl_Object_Ops *opsp = NULL, *copsp = NULL; 46 const Efl_Object_Ops *opsp = NULL;
47 47
48#ifndef OWNING_EXTRA_OPS 48#ifndef OWNING_EXTRA_OPS
49#define OWNING_EXTRA_OPS 49#define OWNING_EXTRA_OPS
@@ -56,12 +56,7 @@ _owning_class_initializer(Efl_Class *klass)
56 ); 56 );
57 opsp = &ops; 57 opsp = &ops;
58 58
59#ifdef OWNING_EXTRA_CLASS_OPS 59 return efl_class_functions_set(klass, opsp, NULL, NULL);
60 EFL_OPS_DEFINE(cops, OWNING_EXTRA_CLASS_OPS);
61 copsp = &cops;
62#endif
63
64 return efl_class_functions_set(klass, opsp, copsp, NULL);
65} 60}
66 61
67static const Efl_Class_Description _owning_class_desc = { 62static const Efl_Class_Description _owning_class_desc = {