diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-02-09 18:45:27 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-02-13 16:59:58 +0100 |
commit | 37d2d378ec2e2d1f9a3941372ef4d818996291c7 (patch) | |
tree | e100879fbdc9ce0d2ce810be81977be97125603b /src/tests/eolian/data/override_ref.c | |
parent | 3b2a5a429be16e5b8e5d322b7a077a2c849586b8 (diff) | |
download | efl-37d2d378ec2e2d1f9a3941372ef4d818996291c7.tar.gz |
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/override_ref.c')
-rw-r--r-- | src/tests/eolian/data/override_ref.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tests/eolian/data/override_ref.c b/src/tests/eolian/data/override_ref.c index 45cec764a5..2a6c28b813 100644 --- a/src/tests/eolian/data/override_ref.c +++ b/src/tests/eolian/data/override_ref.c @@ -59,7 +59,7 @@ static void __eolian_override_base_z_get(const Eo *obj EINA_UNUSED, Override_Dat static Eina_Bool _override_class_initializer(Efl_Class *klass) { - const Efl_Object_Ops *opsp = NULL, *copsp = NULL; + const Efl_Object_Ops *opsp = NULL; #ifndef OVERRIDE_EXTRA_OPS #define OVERRIDE_EXTRA_OPS @@ -81,12 +81,7 @@ _override_class_initializer(Efl_Class *klass) ); opsp = &ops; -#ifdef OVERRIDE_EXTRA_CLASS_OPS - EFL_OPS_DEFINE(cops, OVERRIDE_EXTRA_CLASS_OPS); - copsp = &cops; -#endif - - return efl_class_functions_set(klass, opsp, copsp, NULL); + return efl_class_functions_set(klass, opsp, NULL, NULL); } static const Efl_Class_Description _override_class_desc = { |