summaryrefslogtreecommitdiff
path: root/src/tests/eo
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-02-15 13:48:59 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-03-08 14:31:08 -0800
commitbc12d9feb5e2904bc9d8e294d922e5de1a95757f (patch)
treebaec76e11965779e96f8688c51f3398d9a0f1864 /src/tests/eo
parent6bb197caa9181f6c2639ecd25649a8237c158dd4 (diff)
eo: make reflection getter const function.
Getter are usually not modifying there object. This is going to put a strong limit on what a getter property for MVVM is, as it will prevent any side effect on getting a property from a View. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7969
Diffstat (limited to 'src/tests/eo')
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c6
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.h2
-rw-r--r--src/tests/eo/suite/eo_test_reflection_complex_class_structure.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index f374575ee4..846c2f2cb0 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -36,7 +36,7 @@ _a_set_reflect(Eo *obj, Eina_Value value)
36} 36}
37 37
38static int 38static int
39_a_get(Eo *obj EINA_UNUSED, void *class_data) 39_a_get(const Eo *obj EINA_UNUSED, void *class_data)
40{ 40{
41 Simple_Public_Data *pd = class_data; 41 Simple_Public_Data *pd = class_data;
42 42
@@ -44,7 +44,7 @@ _a_get(Eo *obj EINA_UNUSED, void *class_data)
44} 44}
45 45
46static Eina_Value 46static Eina_Value
47_a_get_reflect(Eo *obj) 47_a_get_reflect(const Eo *obj)
48{ 48{
49 int a = simple_a_get(obj); 49 int a = simple_a_get(obj);
50 50
@@ -94,7 +94,7 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Efl_Dbg_Info *root)
94} 94}
95 95
96EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a); 96EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
97EFL_FUNC_BODY(simple_a_get, int, 0); 97EFL_FUNC_BODY_CONST(simple_a_get, int, 0);
98EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); 98EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
99EFL_VOID_FUNC_BODY(simple_pure_virtual); 99EFL_VOID_FUNC_BODY(simple_pure_virtual);
100EFL_VOID_FUNC_BODY(simple_no_implementation); 100EFL_VOID_FUNC_BODY(simple_no_implementation);
diff --git a/src/tests/eo/suite/eo_test_class_simple.h b/src/tests/eo/suite/eo_test_class_simple.h
index 57e6c8fe12..b438b14d97 100644
--- a/src/tests/eo/suite/eo_test_class_simple.h
+++ b/src/tests/eo/suite/eo_test_class_simple.h
@@ -7,7 +7,7 @@ typedef struct
7} Simple_Public_Data; 7} Simple_Public_Data;
8 8
9EAPI void simple_a_set(Eo *obj, int a); 9EAPI void simple_a_set(Eo *obj, int a);
10EAPI int simple_a_get(Eo *obj); 10EAPI int simple_a_get(const Eo *obj);
11EAPI Eina_Bool simple_a_print(Eo *obj); 11EAPI Eina_Bool simple_a_print(Eo *obj);
12EAPI Eina_Bool simple_class_hi_print(const Eo *obj); 12EAPI Eina_Bool simple_class_hi_print(const Eo *obj);
13EAPI void simple_recursive(Eo *obj, int n); 13EAPI void simple_recursive(Eo *obj, int n);
diff --git a/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c
index 474f0f77c2..19727ca879 100644
--- a/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c
+++ b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c
@@ -93,7 +93,7 @@ __eolian_complex_interface_i_test_set_reflect(Eo *obj, Eina_Value val)
93EOAPI EFL_VOID_FUNC_BODYV(complex_interface_i_test_set, EFL_FUNC_CALL(i), int i); 93EOAPI EFL_VOID_FUNC_BODYV(complex_interface_i_test_set, EFL_FUNC_CALL(i), int i);
94 94
95static Eina_Value 95static Eina_Value
96__eolian_complex_interface_i_test_get_reflect(Eo *obj) 96__eolian_complex_interface_i_test_get_reflect(const Eo *obj)
97{ 97{
98 int val = complex_interface_i_test_get(obj); 98 int val = complex_interface_i_test_get(obj);
99 return eina_value_int_init(val); 99 return eina_value_int_init(val);
@@ -161,7 +161,7 @@ EOAPI EFL_VOID_FUNC_BODYV(complex_mixin_m_test_set, EFL_FUNC_CALL(i), int i);
161 161
162 162
163static Eina_Value 163static Eina_Value
164__eolian_complex_mixin_m_test_get_reflect(Eo *obj) 164__eolian_complex_mixin_m_test_get_reflect(const Eo *obj)
165{ 165{
166 int val = complex_mixin_m_test_get(obj); 166 int val = complex_mixin_m_test_get(obj);
167 return eina_value_int_init(val); 167 return eina_value_int_init(val);