summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-09-09 10:53:58 +0100
committerTom Hacohen <tom@stosb.com>2016-09-09 11:14:35 +0100
commit7ebf9d879d41169beda06b0195e4a3b3c60818e1 (patch)
treed95a4bf61adb806446376b3c5e84b7deb2dfba3c /src/tests/eo/suite
parent12dbab33f9281e3052b66126c8e9a182372f30b6 (diff)
Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to around 20KiB more of saving in private dirty pages in elementary. This also looks a bit better and feels a bit cleaner. Breaks API and ABI.
Diffstat (limited to 'src/tests/eo/suite')
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c2
-rw-r--r--src/tests/eo/suite/eo_test_class_errors.c6
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c14
-rw-r--r--src/tests/eo/suite/eo_test_class_singleton.c2
-rw-r--r--src/tests/eo/suite/eo_test_domain.c2
-rw-r--r--src/tests/eo/suite/eo_test_general.c6
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
7 files changed, 18 insertions, 16 deletions
diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
index 49fef3bcd4..43d72d4301 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -29,7 +29,7 @@ _destructor_unref_class_initializer(Efl_Class *klass2)
29 EFL_OBJECT_OP_FUNC(efl_destructor, _destructor_unref), 29 EFL_OBJECT_OP_FUNC(efl_destructor, _destructor_unref),
30 ); 30 );
31 31
32 return efl_class_functions_set(klass2, &ops); 32 return efl_class_functions_set(klass2, &ops, NULL);
33} 33}
34 34
35START_TEST(efl_destructor_unref) 35START_TEST(efl_destructor_unref)
diff --git a/src/tests/eo/suite/eo_test_class_errors.c b/src/tests/eo/suite/eo_test_class_errors.c
index 0e475b52d4..ef15c99707 100644
--- a/src/tests/eo/suite/eo_test_class_errors.c
+++ b/src/tests/eo/suite/eo_test_class_errors.c
@@ -209,7 +209,7 @@ _null_class_initializer(Efl_Class *klass)
209 EFL_OBJECT_OP_FUNC(NULL, _null_fct), 209 EFL_OBJECT_OP_FUNC(NULL, _null_fct),
210 ); 210 );
211 211
212 return efl_class_functions_set(klass, &ops); 212 return efl_class_functions_set(klass, &ops, NULL);
213} 213}
214 214
215START_TEST(eo_null_api) 215START_TEST(eo_null_api)
@@ -248,7 +248,7 @@ _redefined_class_initializer(Efl_Class *klass)
248 EFL_OBJECT_OP_FUNC(null_fct, NULL), 248 EFL_OBJECT_OP_FUNC(null_fct, NULL),
249 ); 249 );
250 250
251 return efl_class_functions_set(klass, &ops); 251 return efl_class_functions_set(klass, &ops, NULL);
252} 252}
253 253
254START_TEST(eo_api_redefined) 254START_TEST(eo_api_redefined)
@@ -287,7 +287,7 @@ _dich_func_class_initializer(Efl_Class *klass)
287 EFL_OBJECT_OP_FUNC(simple_a_set, NULL), 287 EFL_OBJECT_OP_FUNC(simple_a_set, NULL),
288 ); 288 );
289 289
290 return efl_class_functions_set(klass, &ops); 290 return efl_class_functions_set(klass, &ops, NULL);
291} 291}
292 292
293START_TEST(eo_dich_func_override) 293START_TEST(eo_dich_func_override)
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index a740e433f2..56620c68a2 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -95,14 +95,16 @@ _class_initializer(Efl_Class *klass)
95 EFL_OBJECT_OP_FUNC(simple_a_set, _a_set), 95 EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
96 EFL_OBJECT_OP_FUNC(simple_a_get, _a_get), 96 EFL_OBJECT_OP_FUNC(simple_a_get, _a_get),
97 EFL_OBJECT_OP_FUNC(simple_a_print, _a_print), 97 EFL_OBJECT_OP_FUNC(simple_a_print, _a_print),
98 EFL_OBJECT_OP_CLASS_FUNC(simple_class_hi_print, _class_hi_print),
99 EFL_OBJECT_OP_FUNC(simple_recursive, _recursive), 98 EFL_OBJECT_OP_FUNC(simple_recursive, _recursive),
100 EFL_OBJECT_OP_FUNC(simple_part_get, _part_get), 99 EFL_OBJECT_OP_FUNC(simple_part_get, _part_get),
101 EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL), 100 EFL_OBJECT_OP_FUNC(simple_pure_virtual, NULL),
102 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get), 101 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _dbg_info_get),
103 ); 102 );
103 EFL_OPS_DEFINE(cops,
104 EFL_OBJECT_OP_FUNC(simple_class_hi_print, _class_hi_print),
105 );
104 106
105 return efl_class_functions_set(klass, &ops); 107 return efl_class_functions_set(klass, &ops, &cops);
106} 108}
107 109
108static const Efl_Class_Description class_desc = { 110static const Efl_Class_Description class_desc = {
@@ -129,11 +131,11 @@ EFL_FUNC_BODY_CONST(simple2_class_beef_get, int, 0);
129static Eina_Bool 131static Eina_Bool
130_class_initializer2(Efl_Class *klass) 132_class_initializer2(Efl_Class *klass)
131{ 133{
132 EFL_OPS_DEFINE(ops, 134 EFL_OPS_DEFINE(cops,
133 EFL_OBJECT_OP_CLASS_FUNC(simple2_class_beef_get, _beef_get), 135 EFL_OBJECT_OP_FUNC(simple2_class_beef_get, _beef_get),
134 ); 136 );
135 137
136 return efl_class_functions_set(klass, &ops); 138 return efl_class_functions_set(klass, NULL, &cops);
137} 139}
138 140
139static const Efl_Class_Description class_desc2 = { 141static const Efl_Class_Description class_desc2 = {
@@ -163,7 +165,7 @@ _searchable_class_initializer(Efl_Class *klass)
163 EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get) 165 EFL_OBJECT_OP_FUNC(efl_provider_find, _interface_get)
164 ); 166 );
165 167
166 return efl_class_functions_set(klass, &ops); 168 return efl_class_functions_set(klass, &ops, NULL);
167} 169}
168 170
169static const Efl_Class_Description class_desc_searchable = { 171static const Efl_Class_Description class_desc_searchable = {
diff --git a/src/tests/eo/suite/eo_test_class_singleton.c b/src/tests/eo/suite/eo_test_class_singleton.c
index 4bed42e2cc..e5db1ff62c 100644
--- a/src/tests/eo/suite/eo_test_class_singleton.c
+++ b/src/tests/eo/suite/eo_test_class_singleton.c
@@ -32,7 +32,7 @@ _class_initializer(Efl_Class *klass)
32 EFL_OBJECT_OP_FUNC(efl_constructor, _singleton_efl_constructor), 32 EFL_OBJECT_OP_FUNC(efl_constructor, _singleton_efl_constructor),
33 ); 33 );
34 34
35 return efl_class_functions_set(klass, &ops); 35 return efl_class_functions_set(klass, &ops, NULL);
36} 36}
37 37
38static const Efl_Class_Description class_desc = { 38static const Efl_Class_Description class_desc = {
diff --git a/src/tests/eo/suite/eo_test_domain.c b/src/tests/eo/suite/eo_test_domain.c
index 6f88e597f1..45a1fe377f 100644
--- a/src/tests/eo/suite/eo_test_domain.c
+++ b/src/tests/eo/suite/eo_test_domain.c
@@ -65,7 +65,7 @@ _class_initializer(Efl_Class *klass)
65 EFL_OBJECT_OP_FUNC(domain_a_get, _a_get), 65 EFL_OBJECT_OP_FUNC(domain_a_get, _a_get),
66 EFL_OBJECT_OP_FUNC(domain_recursive, _recursive) 66 EFL_OBJECT_OP_FUNC(domain_recursive, _recursive)
67 ); 67 );
68 return efl_class_functions_set(klass, &ops); 68 return efl_class_functions_set(klass, &ops, NULL);
69} 69}
70 70
71static const Efl_Class_Description class_desc = { 71static const Efl_Class_Description class_desc = {
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 1676faf344..73418337d0 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -436,7 +436,7 @@ _class_initializer(Efl_Class *klass)
436 EFL_OBJECT_OP_FUNC(efl_destructor, _man_des), 436 EFL_OBJECT_OP_FUNC(efl_destructor, _man_des),
437 ); 437 );
438 438
439 return efl_class_functions_set(klass, &ops); 439 return efl_class_functions_set(klass, &ops, NULL);
440} 440}
441 441
442START_TEST(eo_man_free) 442START_TEST(eo_man_free)
@@ -990,7 +990,7 @@ _multi_class_initializer(Efl_Class *klass)
990 EFL_OBJECT_OP_FUNC(multi_class_hi_print, _class_hi_print), 990 EFL_OBJECT_OP_FUNC(multi_class_hi_print, _class_hi_print),
991 ); 991 );
992 992
993 return efl_class_functions_set(klass, &ops); 993 return efl_class_functions_set(klass, &ops, NULL);
994} 994}
995 995
996START_TEST(eo_multiple_do) 996START_TEST(eo_multiple_do)
@@ -1169,7 +1169,7 @@ _add_failures_class_initializer(Efl_Class *klass)
1169 EFL_OBJECT_OP_FUNC(efl_finalize, _efl_add_failures_finalize), 1169 EFL_OBJECT_OP_FUNC(efl_finalize, _efl_add_failures_finalize),
1170 ); 1170 );
1171 1171
1172 return efl_class_functions_set(klass, &ops); 1172 return efl_class_functions_set(klass, &ops, NULL);
1173} 1173}
1174 1174
1175START_TEST(efl_add_failures) 1175START_TEST(efl_add_failures)
diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c
index e707fc04e1..aea925ea62 100644
--- a/src/tests/eo/suite/eo_test_threaded_calls.c
+++ b/src/tests/eo/suite/eo_test_threaded_calls.c
@@ -69,7 +69,7 @@ _class_initializer(Efl_Class *klass)
69 EFL_OBJECT_OP_FUNC(thread_test_try_swap_stack, _try_swap_stack), 69 EFL_OBJECT_OP_FUNC(thread_test_try_swap_stack, _try_swap_stack),
70 ); 70 );
71 71
72 return efl_class_functions_set(klass, &ops); 72 return efl_class_functions_set(klass, &ops, NULL);
73} 73}
74 74
75static const Efl_Class_Description class_desc = { 75static const Efl_Class_Description class_desc = {