aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/efl_mono/libefl_mono_native_test.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/efl_mono/libefl_mono_native_test.c
parentefl_input: remove the API of efl_input_instance_get (diff)
downloadefl-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 https://phab.enlightenment.org/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 https://phab.enlightenment.org/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/efl_mono/libefl_mono_native_test.c')
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 51086216e3..674d1f8f23 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -3827,24 +3827,15 @@ Dummy_MyInt _dummy_test_object_bypass_typedef(EINA_UNUSED Eo *obj, EINA_UNUSED D
/* Class Properties */
static int _dummy_test_object_klass_prop = 0;
-int _dummy_test_object_klass_prop_get(const Eo *klass, EINA_UNUSED void *pd)
+int _dummy_test_object_klass_prop_get(void)
{
- EINA_LOG_ERR("FAIL on GET");
- if (klass != dummy_test_object_class_get())
- {
- eina_error_set(EINVAL);
- return -1;
- }
+ EINA_LOG_ERR("FAIL on GET");
return _dummy_test_object_klass_prop;
}
-void _dummy_test_object_klass_prop_set(Eo *klass, EINA_UNUSED void *pd, int value)
+void _dummy_test_object_klass_prop_set(int value)
{
- EINA_LOG_ERR("FAIL on SET");
- if (klass != dummy_test_object_class_get())
- {
- eina_error_set(EINVAL);
- }
+ EINA_LOG_ERR("FAIL on SET");
_dummy_test_object_klass_prop = value;
}
@@ -3858,7 +3849,7 @@ Eina_Future* _dummy_test_object_get_future(EINA_UNUSED Eo *obj, Dummy_Test_Objec
{
if (pd->promise == NULL)
{
- Eo *loop = efl_app_main_get(EFL_APP_CLASS);
+ Eo *loop = efl_app_main_get();
Eina_Future_Scheduler *scheduler = efl_loop_future_scheduler_get(loop);
pd->promise = eina_promise_new(scheduler, _promise_cancelled, pd);
}
@@ -3989,14 +3980,14 @@ _dummy_child_class_destructor(Efl_Class *klass)
}
// Inherit
-int _dummy_inherit_helper_receive_dummy_and_call_int_out(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x)
+int _dummy_inherit_helper_receive_dummy_and_call_int_out(Dummy_Test_Object *x)
{
int v = 8;
dummy_test_object_int_out (x, 5, &v);
return v;
}
-const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x)
+const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Dummy_Test_Object *x)
{
return dummy_inherit_iface_stringshare_test (x, eina_stringshare_add("hello world"));
}