summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/elementary/test_ui_box.c2
-rw-r--r--src/bin/eolian/eo_generator.c2
-rw-r--r--src/lib/elementary/efl_ui_grid.c10
-rw-r--r--src/lib/eo/Eo.h4
-rw-r--r--src/tests/eo/access/access_inherit.c12
-rw-r--r--src/tests/eo/access/access_simple.c12
-rw-r--r--src/tests/eo/suite/eo_test_general.c6
7 files changed, 33 insertions, 15 deletions
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index e12438a3e3..44fedfab4c 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -177,7 +177,7 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
static void
custom_check_cb(void *data, const Efl_Event *event)
{
- EFL_OBJECT_OVERRIDE_OPS_DEFINE(custom_layout_ops,
+ EFL_OPS_DEFINE(custom_layout_ops,
EFL_OBJECT_OP_FUNC_OVERRIDE(efl_pack_layout_update, _custom_layout_update));
Eina_Bool chk = elm_check_selected_get(event->object);
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 3a9c68b983..35b0593f6a 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -22,7 +22,7 @@ tmpl_eo_ops_desc[] = "\
static Eina_Bool\n\
_@#class_class_initializer(Efl_Class *klass)\n\
{\n\
- EFL_OBJECT_OVERRIDE_OPS_DEFINE(ops,@#list_op\n\
+ EFL_OPS_DEFINE(ops,@#list_op\n\
);\n\
\n\
return efl_class_functions_set(klass, &ops);\n\
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index 5c8db37991..32d3fb7b68 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -165,8 +165,14 @@ _table_size_hints_changed(void *data, Evas *e EINA_UNUSED,
/* Custom table class: overrides smart_calculate. */
static void _custom_table_calc(Eo *obj, Custom_Table_Data *pd);
-static const Efl_Op_Description custom_table_op_desc[] = {
- EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(efl_canvas_group_calculate, _custom_table_calc),
+static Eina_Bool
+_custom_table_initializer(Efl_Class *klass)
+{
+ EFL_OPS_DEFINE(ops,
+ EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(efl_canvas_group_calculate, _custom_table_calc)
+ );
+
+ return efl_class_functions_set(klass, &ops);
};
static const Efl_Class_Description custom_table_class_desc = {
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index f241ca80f8..58644fe869 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -466,13 +466,13 @@ EAPI Eina_Bool efl_object_override(Eo *obj, const Efl_Object_Ops *ops);
*
* This can be used as follows:
* @code
- * EFL_OBJECT_OVERRIDE_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC_OVERRIDE(public_func, _my_func));
+ * EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC_OVERRIDE(public_func, _my_func));
* efl_object_override(obj, &ops);
* @endcode
*
* @see efl_object_override
*/
-#define EFL_OBJECT_OVERRIDE_OPS_DEFINE(ops, ...) \
+#define EFL_OPS_DEFINE(ops, ...) \
const Efl_Op_Description _##ops##_descs[] = { __VA_ARGS__ }; \
const Efl_Object_Ops ops = { _##ops##_descs, EINA_C_ARRAY_LENGTH(_##ops##_descs) }
diff --git a/src/tests/eo/access/access_inherit.c b/src/tests/eo/access/access_inherit.c
index 2967f3d66d..2e903db163 100644
--- a/src/tests/eo/access/access_inherit.c
+++ b/src/tests/eo/access/access_inherit.c
@@ -18,9 +18,15 @@ _prot_print(Eo *obj, void *class_data EINA_UNUSED)
EAPI EFL_VOID_FUNC_BODY(inherit_prot_print);
-static Efl_Op_Description op_descs[] = {
- EFL_OBJECT_OP_FUNC(inherit_prot_print, _prot_print),
-};
+static Eina_Bool
+_class_initializer(Efl_Class *klass)
+{
+ EFL_OPS_DEFINE(ops,
+ EFL_OBJECT_OP_FUNC(inherit_prot_print, _prot_print),
+ );
+
+ return efl_class_functions_set(klass, &ops);
+}
static const Efl_Class_Description class_desc = {
EO_VERSION,
diff --git a/src/tests/eo/access/access_simple.c b/src/tests/eo/access/access_simple.c
index 52bafcf776..27550ce771 100644
--- a/src/tests/eo/access/access_simple.c
+++ b/src/tests/eo/access/access_simple.c
@@ -32,9 +32,15 @@ _a_set(Eo *obj, void *class_data, int a)
EAPI EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
-static Efl_Op_Description op_descs[] = {
- EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
-};
+static Eina_Bool
+_class_initializer(Efl_Class *klass)
+{
+ EFL_OPS_DEFINE(ops,
+ EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
+ );
+
+ return efl_class_functions_set(klass, &ops);
+}
static const Efl_Class_Description class_desc = {
EO_VERSION,
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 4e2b2b32d4..e40ad8978e 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -73,7 +73,7 @@ START_TEST(efl_object_override_tests)
* make sure we don't cache. */
ck_assert_int_eq(simple_a_get(obj), 0);
- EFL_OBJECT_OVERRIDE_OPS_DEFINE(
+ EFL_OPS_DEFINE(
overrides,
EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_get, _simple_obj_override_a_get));
fail_if(!efl_object_override(obj, &overrides));
@@ -85,7 +85,7 @@ START_TEST(efl_object_override_tests)
ck_assert_int_eq(simple_a_get(obj), OVERRIDE_A + OVERRIDE_A_SIMPLE);
/* Override again. */
- EFL_OBJECT_OVERRIDE_OPS_DEFINE(
+ EFL_OPS_DEFINE(
overrides2,
EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _simple_obj_override_a_double_set));
fail_if(!efl_object_override(obj, NULL));
@@ -99,7 +99,7 @@ START_TEST(efl_object_override_tests)
ck_assert_int_eq(simple_a_get(obj), OVERRIDE_A_SIMPLE * 2);
/* Try introducing a new function */
- EFL_OBJECT_OVERRIDE_OPS_DEFINE(
+ EFL_OPS_DEFINE(
overrides3,
EFL_OBJECT_OP_FUNC(simple2_class_beef_get, _simple_obj_override_a_double_set));
fail_if(!efl_object_override(obj, NULL));