summaryrefslogtreecommitdiff
path: root/legacy/eobj
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2012-06-10 14:04:53 +0000
committerTom Hacohen <tom@stosb.com>2012-06-10 14:04:53 +0000
commit9c929ba2ed337a49c7d56f117106ed75d7a8166a (patch)
tree85106633d51d80e87189219a0175ef8b370c3493 /legacy/eobj
parentc712e0fc294f0ed80f91e0751832629ca67031d2 (diff)
Eo: Made constructor/destructor regular ops.
This lets us remove some unneeded code and makes everything nicer. SVN revision: 71899
Diffstat (limited to 'legacy/eobj')
-rw-r--r--legacy/eobj/CMakeLists.txt2
-rw-r--r--legacy/eobj/examples/access/inherit.c2
-rw-r--r--legacy/eobj/examples/access/simple.c2
-rw-r--r--legacy/eobj/examples/composite_objects/comp.c7
-rw-r--r--legacy/eobj/examples/composite_objects/simple.c2
-rw-r--r--legacy/eobj/examples/constructors/mixin.c12
-rw-r--r--legacy/eobj/examples/constructors/simple.c12
-rw-r--r--legacy/eobj/examples/constructors/simple2.c19
-rw-r--r--legacy/eobj/examples/constructors/simple3.c17
-rw-r--r--legacy/eobj/examples/constructors/simple4.c2
-rw-r--r--legacy/eobj/examples/constructors/simple5.c17
-rw-r--r--legacy/eobj/examples/constructors/simple6.c19
-rw-r--r--legacy/eobj/examples/evas/elw_box.c2
-rw-r--r--legacy/eobj/examples/evas/elw_boxedbutton.c4
-rw-r--r--legacy/eobj/examples/evas/elw_button.c6
-rw-r--r--legacy/eobj/examples/evas/elw_win.c2
-rw-r--r--legacy/eobj/examples/evas/evas_obj.c6
-rw-r--r--legacy/eobj/examples/function_overrides/inherit.c2
-rw-r--r--legacy/eobj/examples/function_overrides/inherit2.c2
-rw-r--r--legacy/eobj/examples/function_overrides/inherit3.c2
-rw-r--r--legacy/eobj/examples/function_overrides/main.c4
-rw-r--r--legacy/eobj/examples/function_overrides/simple.c2
-rw-r--r--legacy/eobj/examples/interface/interface.c2
-rw-r--r--legacy/eobj/examples/interface/interface2.c2
-rw-r--r--legacy/eobj/examples/interface/simple.c2
-rw-r--r--legacy/eobj/examples/mixin/mixin.c12
-rw-r--r--legacy/eobj/examples/mixin/mixin2.c12
-rw-r--r--legacy/eobj/examples/mixin/mixin3.c12
-rw-r--r--legacy/eobj/examples/mixin/simple.c2
-rw-r--r--legacy/eobj/examples/signals/simple.c7
-rw-r--r--legacy/eobj/lib/Eo.h43
-rw-r--r--legacy/eobj/lib/eo.c106
-rw-r--r--legacy/eobj/lib/eo_base_class.c14
-rw-r--r--legacy/eobj/lib/eo_private.h2
-rw-r--r--legacy/eobj/tests/class_simple.c2
-rw-r--r--legacy/eobj/tests/eo_test_class_errors.c33
-rw-r--r--legacy/eobj/tests/eo_test_general.c47
37 files changed, 193 insertions, 250 deletions
diff --git a/legacy/eobj/CMakeLists.txt b/legacy/eobj/CMakeLists.txt
index f4e1f2e4c0..0f579e8006 100644
--- a/legacy/eobj/CMakeLists.txt
+++ b/legacy/eobj/CMakeLists.txt
@@ -39,7 +39,7 @@ configure_file (
39include(EFLCheck) 39include(EFLCheck)
40 40
41add_subdirectory(lib) 41add_subdirectory(lib)
42add_subdirectory(examples/evas) 42#add_subdirectory(examples/evas)
43add_subdirectory(examples/mixin) 43add_subdirectory(examples/mixin)
44add_subdirectory(examples/signals) 44add_subdirectory(examples/signals)
45add_subdirectory(examples/access) 45add_subdirectory(examples/access)
diff --git a/legacy/eobj/examples/access/inherit.c b/legacy/eobj/examples/access/inherit.c
index 91a88691b7..2bf8abebe3 100644
--- a/legacy/eobj/examples/access/inherit.c
+++ b/legacy/eobj/examples/access/inherit.c
@@ -40,8 +40,6 @@ static const Eo_Class_Description class_desc = {
40 EO_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST), 40 EO_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),
41 NULL, 41 NULL,
42 0, 42 0,
43 NULL,
44 NULL,
45 _class_constructor, 43 _class_constructor,
46 NULL 44 NULL
47}; 45};
diff --git a/legacy/eobj/examples/access/simple.c b/legacy/eobj/examples/access/simple.c
index 13992145c8..12cb082399 100644
--- a/legacy/eobj/examples/access/simple.c
+++ b/legacy/eobj/examples/access/simple.c
@@ -57,8 +57,6 @@ static const Eo_Class_Description class_desc = {
57 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 57 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
58 event_desc, 58 event_desc,
59 sizeof(Private_Data), 59 sizeof(Private_Data),
60 NULL,
61 NULL,
62 _class_constructor, 60 _class_constructor,
63 NULL 61 NULL
64}; 62};
diff --git a/legacy/eobj/examples/composite_objects/comp.c b/legacy/eobj/examples/composite_objects/comp.c
index f8ed9f2412..4774974f53 100644
--- a/legacy/eobj/examples/composite_objects/comp.c
+++ b/legacy/eobj/examples/composite_objects/comp.c
@@ -19,9 +19,9 @@ _a_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
19} 19}
20 20
21static void 21static void
22_constructor(Eo *obj, void *class_data EINA_UNUSED) 22_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
23{ 23{
24 eo_constructor_super(obj); 24 eo_do_super(obj, eo_constructor());
25 25
26 Eo *simple = eo_add(SIMPLE_CLASS, obj); 26 Eo *simple = eo_add(SIMPLE_CLASS, obj);
27 eo_composite_object_attach(obj, simple); 27 eo_composite_object_attach(obj, simple);
@@ -39,6 +39,7 @@ static void
39_class_constructor(Eo_Class *klass) 39_class_constructor(Eo_Class *klass)
40{ 40{
41 const Eo_Op_Func_Description func_desc[] = { 41 const Eo_Op_Func_Description func_desc[] = {
42 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
42 EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), 43 EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
43 EO_OP_FUNC_SENTINEL 44 EO_OP_FUNC_SENTINEL
44 }; 45 };
@@ -52,8 +53,6 @@ static const Eo_Class_Description class_desc = {
52 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 53 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
53 NULL, 54 NULL,
54 0, 55 0,
55 _constructor,
56 NULL,
57 _class_constructor, 56 _class_constructor,
58 NULL 57 NULL
59}; 58};
diff --git a/legacy/eobj/examples/composite_objects/simple.c b/legacy/eobj/examples/composite_objects/simple.c
index d7e5e257b0..dbb40df556 100644
--- a/legacy/eobj/examples/composite_objects/simple.c
+++ b/legacy/eobj/examples/composite_objects/simple.c
@@ -60,8 +60,6 @@ static const Eo_Class_Description class_desc = {
60 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 60 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
61 event_desc, 61 event_desc,
62 sizeof(Simple_Public_Data), 62 sizeof(Simple_Public_Data),
63 NULL,
64 NULL,
65 _class_constructor, 63 _class_constructor,
66 NULL 64 NULL
67}; 65};
diff --git a/legacy/eobj/examples/constructors/mixin.c b/legacy/eobj/examples/constructors/mixin.c
index b8d9cf6a04..a572f3f89a 100644
--- a/legacy/eobj/examples/constructors/mixin.c
+++ b/legacy/eobj/examples/constructors/mixin.c
@@ -20,17 +20,17 @@ _add_and_print_set(const Eo *obj, const void *class_data EINA_UNUSED, va_list *l
20extern int my_init_count; 20extern int my_init_count;
21 21
22static void 22static void
23_constructor(Eo *obj, void *class_data EINA_UNUSED) 23_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
24{ 24{
25 eo_constructor_super(obj); 25 eo_do_super(obj, eo_constructor());
26 26
27 my_init_count++; 27 my_init_count++;
28} 28}
29 29
30static void 30static void
31_destructor(Eo *obj, void *class_data EINA_UNUSED) 31_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
32{ 32{
33 eo_destructor_super(obj); 33 eo_do_super(obj, eo_destructor());
34 34
35 my_init_count--; 35 my_init_count--;
36} 36}
@@ -39,6 +39,8 @@ static void
39_class_constructor(Eo_Class *klass) 39_class_constructor(Eo_Class *klass)
40{ 40{
41 const Eo_Op_Func_Description func_desc[] = { 41 const Eo_Op_Func_Description func_desc[] = {
42 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
43 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
42 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set), 44 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
43 EO_OP_FUNC_SENTINEL 45 EO_OP_FUNC_SENTINEL
44 }; 46 };
@@ -57,8 +59,6 @@ static const Eo_Class_Description class_desc = {
57 EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST), 59 EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),
58 NULL, 60 NULL,
59 0, 61 0,
60 _constructor,
61 _destructor,
62 _class_constructor, 62 _class_constructor,
63 NULL 63 NULL
64}; 64};
diff --git a/legacy/eobj/examples/constructors/simple.c b/legacy/eobj/examples/constructors/simple.c
index 7918b8c262..c1dddb4e8b 100644
--- a/legacy/eobj/examples/constructors/simple.c
+++ b/legacy/eobj/examples/constructors/simple.c
@@ -42,17 +42,17 @@ _GET_SET_FUNC(b)
42extern int my_init_count; 42extern int my_init_count;
43 43
44static void 44static void
45_constructor(Eo *obj, void *class_data EINA_UNUSED) 45_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
46{ 46{
47 eo_constructor_super(obj); 47 eo_do_super(obj, eo_constructor());
48 48
49 my_init_count++; 49 my_init_count++;
50} 50}
51 51
52static void 52static void
53_destructor(Eo *obj, void *class_data EINA_UNUSED) 53_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
54{ 54{
55 eo_destructor_super(obj); 55 eo_do_super(obj, eo_destructor());
56 56
57 my_init_count--; 57 my_init_count--;
58} 58}
@@ -61,6 +61,8 @@ static void
61_class_constructor(Eo_Class *klass) 61_class_constructor(Eo_Class *klass)
62{ 62{
63 const Eo_Op_Func_Description func_desc[] = { 63 const Eo_Op_Func_Description func_desc[] = {
64 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
65 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
64 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), 66 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
65 EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), 67 EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
66 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set), 68 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
@@ -93,8 +95,6 @@ static const Eo_Class_Description class_desc = {
93 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 95 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
94 NULL, 96 NULL,
95 sizeof(Private_Data), 97 sizeof(Private_Data),
96 _constructor,
97 _destructor,
98 _class_constructor, 98 _class_constructor,
99 _class_destructor 99 _class_destructor
100}; 100};
diff --git a/legacy/eobj/examples/constructors/simple2.c b/legacy/eobj/examples/constructors/simple2.c
index 2980dca060..9effd917b4 100644
--- a/legacy/eobj/examples/constructors/simple2.c
+++ b/legacy/eobj/examples/constructors/simple2.c
@@ -7,22 +7,31 @@
7#define MY_CLASS SIMPLE2_CLASS 7#define MY_CLASS SIMPLE2_CLASS
8 8
9static void 9static void
10_constructor(Eo *obj, void *class_data EINA_UNUSED) 10_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
11{ 11{
12 eo_constructor_super(obj); 12 eo_do_super(obj, eo_constructor());
13 13
14 eo_error_set(obj); 14 eo_error_set(obj);
15} 15}
16 16
17static void
18_class_constructor(Eo_Class *klass)
19{
20 const Eo_Op_Func_Description func_desc[] = {
21 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
22 EO_OP_FUNC_SENTINEL
23 };
24
25 eo_class_funcs_set(klass, func_desc);
26}
27
17static const Eo_Class_Description class_desc = { 28static const Eo_Class_Description class_desc = {
18 "Simple2", 29 "Simple2",
19 EO_CLASS_TYPE_REGULAR, 30 EO_CLASS_TYPE_REGULAR,
20 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 31 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
21 NULL, 32 NULL,
22 0, 33 0,
23 _constructor, 34 _class_constructor,
24 NULL,
25 NULL,
26 NULL 35 NULL
27}; 36};
28 37
diff --git a/legacy/eobj/examples/constructors/simple3.c b/legacy/eobj/examples/constructors/simple3.c
index a09ec461f4..7ecc874d23 100644
--- a/legacy/eobj/examples/constructors/simple3.c
+++ b/legacy/eobj/examples/constructors/simple3.c
@@ -7,20 +7,29 @@
7#define MY_CLASS SIMPLE3_CLASS 7#define MY_CLASS SIMPLE3_CLASS
8 8
9static void 9static void
10_constructor(Eo *obj, void *class_data EINA_UNUSED) 10_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
11{ 11{
12 (void) obj; 12 (void) obj;
13} 13}
14 14
15static void
16_class_constructor(Eo_Class *klass)
17{
18 const Eo_Op_Func_Description func_desc[] = {
19 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
20 EO_OP_FUNC_SENTINEL
21 };
22
23 eo_class_funcs_set(klass, func_desc);
24}
25
15static const Eo_Class_Description class_desc = { 26static const Eo_Class_Description class_desc = {
16 "Simple3", 27 "Simple3",
17 EO_CLASS_TYPE_REGULAR, 28 EO_CLASS_TYPE_REGULAR,
18 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 29 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
19 NULL, 30 NULL,
20 0, 31 0,
21 _constructor, 32 _class_constructor,
22 NULL,
23 NULL,
24 NULL 33 NULL
25}; 34};
26 35
diff --git a/legacy/eobj/examples/constructors/simple4.c b/legacy/eobj/examples/constructors/simple4.c
index 43099d34f5..0c7eb62726 100644
--- a/legacy/eobj/examples/constructors/simple4.c
+++ b/legacy/eobj/examples/constructors/simple4.c
@@ -12,8 +12,6 @@ static const Eo_Class_Description class_desc = {
12 NULL, 12 NULL,
13 0, 13 0,
14 NULL, 14 NULL,
15 NULL,
16 NULL,
17 NULL 15 NULL
18}; 16};
19 17
diff --git a/legacy/eobj/examples/constructors/simple5.c b/legacy/eobj/examples/constructors/simple5.c
index e8438c0fa1..098a168354 100644
--- a/legacy/eobj/examples/constructors/simple5.c
+++ b/legacy/eobj/examples/constructors/simple5.c
@@ -7,20 +7,29 @@
7#define MY_CLASS SIMPLE5_CLASS 7#define MY_CLASS SIMPLE5_CLASS
8 8
9static void 9static void
10_destructor(Eo *obj, void *class_data EINA_UNUSED) 10_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
11{ 11{
12 (void) obj; 12 (void) obj;
13} 13}
14 14
15static void
16_class_constructor(Eo_Class *klass)
17{
18 const Eo_Op_Func_Description func_desc[] = {
19 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
20 EO_OP_FUNC_SENTINEL
21 };
22
23 eo_class_funcs_set(klass, func_desc);
24}
25
15static const Eo_Class_Description class_desc = { 26static const Eo_Class_Description class_desc = {
16 "Simple5", 27 "Simple5",
17 EO_CLASS_TYPE_REGULAR, 28 EO_CLASS_TYPE_REGULAR,
18 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 29 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
19 NULL, 30 NULL,
20 0, 31 0,
21 NULL, 32 _class_constructor,
22 _destructor,
23 NULL,
24 NULL 33 NULL
25}; 34};
26 35
diff --git a/legacy/eobj/examples/constructors/simple6.c b/legacy/eobj/examples/constructors/simple6.c
index b5c143a6de..743f3ef4a0 100644
--- a/legacy/eobj/examples/constructors/simple6.c
+++ b/legacy/eobj/examples/constructors/simple6.c
@@ -7,22 +7,31 @@
7#define MY_CLASS SIMPLE6_CLASS 7#define MY_CLASS SIMPLE6_CLASS
8 8
9static void 9static void
10_destructor(Eo *obj, void *class_data EINA_UNUSED) 10_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
11{ 11{
12 eo_constructor_super(obj); 12 eo_do_super(obj, eo_constructor());
13 13
14 eo_error_set(obj); 14 eo_error_set(obj);
15} 15}
16 16
17static void
18_class_constructor(Eo_Class *klass)
19{
20 const Eo_Op_Func_Description func_desc[] = {
21 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
22 EO_OP_FUNC_SENTINEL
23 };
24
25 eo_class_funcs_set(klass, func_desc);
26}
27
17static const Eo_Class_Description class_desc = { 28static const Eo_Class_Description class_desc = {
18 "Simple6", 29 "Simple6",
19 EO_CLASS_TYPE_REGULAR, 30 EO_CLASS_TYPE_REGULAR,
20 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 31 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
21 NULL, 32 NULL,
22 0, 33 0,
23 NULL, 34 _class_constructor,
24 _destructor,
25 NULL,
26 NULL 35 NULL
27}; 36};
28 37
diff --git a/legacy/eobj/examples/evas/elw_box.c b/legacy/eobj/examples/evas/elw_box.c
index 508db158c7..e447ddf692 100644
--- a/legacy/eobj/examples/evas/elw_box.c
+++ b/legacy/eobj/examples/evas/elw_box.c
@@ -28,7 +28,7 @@ _pack_end(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
28static void 28static void
29_constructor(Eo *obj, void *class_data) 29_constructor(Eo *obj, void *class_data)
30{ 30{
31 eo_constructor_super(obj); 31 eo_do_super(obj, eo_constructor());
32 32
33 Widget_Data *wd = class_data; 33 Widget_Data *wd = class_data;
34 34
diff --git a/legacy/eobj/examples/evas/elw_boxedbutton.c b/legacy/eobj/examples/evas/elw_boxedbutton.c
index 21c465a1fb..8bdc3081a1 100644
--- a/legacy/eobj/examples/evas/elw_boxedbutton.c
+++ b/legacy/eobj/examples/evas/elw_boxedbutton.c
@@ -16,9 +16,9 @@ typedef struct
16#define MY_CLASS ELW_BOXEDBUTTON_CLASS 16#define MY_CLASS ELW_BOXEDBUTTON_CLASS
17 17
18static void 18static void
19_constructor(Eo *obj, void *class_data EINA_UNUSED) 19_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
20{ 20{
21 eo_constructor_super(obj); 21 eo_do_super(obj, eo_constructor());
22 22
23 Eo *bt = eo_add(ELW_BUTTON_CLASS, obj); 23 Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
24 eo_composite_object_attach(obj, bt); 24 eo_composite_object_attach(obj, bt);
diff --git a/legacy/eobj/examples/evas/elw_button.c b/legacy/eobj/examples/evas/elw_button.c
index 52e6d5f397..3eecb98bd8 100644
--- a/legacy/eobj/examples/evas/elw_button.c
+++ b/legacy/eobj/examples/evas/elw_button.c
@@ -50,7 +50,7 @@ _btn_clicked(void *data, Evas_Object *evas_obj, void *event_info)
50static void 50static void
51_constructor(Eo *obj, void *class_data) 51_constructor(Eo *obj, void *class_data)
52{ 52{
53 eo_constructor_super(obj); 53 eo_do_super(obj, eo_constructor());
54 54
55 Widget_Data *wd = class_data; 55 Widget_Data *wd = class_data;
56 56
@@ -64,9 +64,9 @@ _constructor(Eo *obj, void *class_data)
64} 64}
65 65
66static void 66static void
67_destructor(Eo *obj, void *class_data EINA_UNUSED) 67_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
68{ 68{
69 eo_destructor_super(obj); 69 eo_do_super(obj, eo_destructor());
70 70
71 //Widget_Data *wd = class_data; 71 //Widget_Data *wd = class_data;
72 /* FIXME: Commented out because it's automatically done because our tree 72 /* FIXME: Commented out because it's automatically done because our tree
diff --git a/legacy/eobj/examples/evas/elw_win.c b/legacy/eobj/examples/evas/elw_win.c
index aad69f5fba..2558b00968 100644
--- a/legacy/eobj/examples/evas/elw_win.c
+++ b/legacy/eobj/examples/evas/elw_win.c
@@ -25,7 +25,7 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
25static void 25static void
26_constructor(Eo *obj, void *class_data) 26_constructor(Eo *obj, void *class_data)
27{ 27{
28 eo_constructor_super(obj); 28 eo_do_super(obj, eo_constructor());
29 29
30 Widget_Data *wd = class_data; 30 Widget_Data *wd = class_data;
31 31
diff --git a/legacy/eobj/examples/evas/evas_obj.c b/legacy/eobj/examples/evas/evas_obj.c
index 1177fd63f0..753f773208 100644
--- a/legacy/eobj/examples/evas/evas_obj.c
+++ b/legacy/eobj/examples/evas/evas_obj.c
@@ -78,9 +78,9 @@ _child_add(Eo *obj, void *class_data, va_list *list)
78} 78}
79 79
80static void 80static void
81_constructor(Eo *obj, void *class_data EINA_UNUSED) 81_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
82{ 82{
83 eo_constructor_super(obj); 83 eo_do_super(obj, eo_constructor());
84 84
85 /* Add type check. */ 85 /* Add type check. */
86 Eo *parent = eo_parent_get(obj); 86 Eo *parent = eo_parent_get(obj);
@@ -91,7 +91,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
91static void 91static void
92_destructor(Eo *obj, void *class_data) 92_destructor(Eo *obj, void *class_data)
93{ 93{
94 eo_destructor_super(obj); 94 eo_do_super(obj, eo_destructor());
95 95
96 Widget_Data *wd = class_data; 96 Widget_Data *wd = class_data;
97 97
diff --git a/legacy/eobj/examples/function_overrides/inherit.c b/legacy/eobj/examples/function_overrides/inherit.c
index a8cde28921..c9d256a25d 100644
--- a/legacy/eobj/examples/function_overrides/inherit.c
+++ b/legacy/eobj/examples/function_overrides/inherit.c
@@ -12,8 +12,6 @@ static const Eo_Class_Description class_desc = {
12 NULL, 12 NULL,
13 0, 13 0,
14 NULL, 14 NULL,
15 NULL,
16 NULL,
17 NULL 15 NULL
18}; 16};
19 17
diff --git a/legacy/eobj/examples/function_overrides/inherit2.c b/legacy/eobj/examples/function_overrides/inherit2.c
index 2d8ed1702c..a3344571db 100644
--- a/legacy/eobj/examples/function_overrides/inherit2.c
+++ b/legacy/eobj/examples/function_overrides/inherit2.c
@@ -72,8 +72,6 @@ static const Eo_Class_Description class_desc = {
72 EO_CLASS_DESCRIPTION_OPS(&INHERIT2_BASE_ID, op_desc, INHERIT2_SUB_ID_LAST), 72 EO_CLASS_DESCRIPTION_OPS(&INHERIT2_BASE_ID, op_desc, INHERIT2_SUB_ID_LAST),
73 NULL, 73 NULL,
74 0, 74 0,
75 NULL,
76 NULL,
77 _class_constructor, 75 _class_constructor,
78 NULL 76 NULL
79}; 77};
diff --git a/legacy/eobj/examples/function_overrides/inherit3.c b/legacy/eobj/examples/function_overrides/inherit3.c
index 43be75fe42..185962e7da 100644
--- a/legacy/eobj/examples/function_overrides/inherit3.c
+++ b/legacy/eobj/examples/function_overrides/inherit3.c
@@ -34,8 +34,6 @@ static const Eo_Class_Description class_desc = {
34 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 34 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
35 NULL, 35 NULL,
36 0, 36 0,
37 NULL,
38 NULL,
39 _class_constructor, 37 _class_constructor,
40 NULL 38 NULL
41}; 39};
diff --git a/legacy/eobj/examples/function_overrides/main.c b/legacy/eobj/examples/function_overrides/main.c
index 4eb770df00..7e9d2e162a 100644
--- a/legacy/eobj/examples/function_overrides/main.c
+++ b/legacy/eobj/examples/function_overrides/main.c
@@ -47,8 +47,8 @@ main(int argc, char *argv[])
47 47
48 fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print())); 48 fail_if(eo_class_do(SIMPLE_CLASS, simple_a_print()));
49 49
50 eo_constructor_super(obj); 50 eo_do_super(obj, eo_constructor());
51 eo_destructor_super(obj); 51 eo_do_super(obj, eo_destructor());
52 52
53 eo_unref(obj); 53 eo_unref(obj);
54 54
diff --git a/legacy/eobj/examples/function_overrides/simple.c b/legacy/eobj/examples/function_overrides/simple.c
index d3742a54c5..328736edcb 100644
--- a/legacy/eobj/examples/function_overrides/simple.c
+++ b/legacy/eobj/examples/function_overrides/simple.c
@@ -70,8 +70,6 @@ static const Eo_Class_Description class_desc = {
70 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 70 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
71 NULL, 71 NULL,
72 sizeof(Simple_Public_Data), 72 sizeof(Simple_Public_Data),
73 NULL,
74 NULL,
75 _class_constructor, 73 _class_constructor,
76 NULL 74 NULL
77}; 75};
diff --git a/legacy/eobj/examples/interface/interface.c b/legacy/eobj/examples/interface/interface.c
index d03a30c663..8015e63273 100644
--- a/legacy/eobj/examples/interface/interface.c
+++ b/legacy/eobj/examples/interface/interface.c
@@ -20,8 +20,6 @@ static const Eo_Class_Description class_desc = {
20 NULL, 20 NULL,
21 0, 21 0,
22 NULL, 22 NULL,
23 NULL,
24 NULL,
25 NULL 23 NULL
26}; 24};
27 25
diff --git a/legacy/eobj/examples/interface/interface2.c b/legacy/eobj/examples/interface/interface2.c
index 9abf7f01b2..0f60bbc5b7 100644
--- a/legacy/eobj/examples/interface/interface2.c
+++ b/legacy/eobj/examples/interface/interface2.c
@@ -21,8 +21,6 @@ static const Eo_Class_Description class_desc = {
21 NULL, 21 NULL,
22 0, 22 0,
23 NULL, 23 NULL,
24 NULL,
25 NULL,
26 NULL 24 NULL
27}; 25};
28 26
diff --git a/legacy/eobj/examples/interface/simple.c b/legacy/eobj/examples/interface/simple.c
index 216bc5a3ef..b72ed7668c 100644
--- a/legacy/eobj/examples/interface/simple.c
+++ b/legacy/eobj/examples/interface/simple.c
@@ -90,8 +90,6 @@ static const Eo_Class_Description class_desc = {
90 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 90 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
91 NULL, 91 NULL,
92 sizeof(Private_Data), 92 sizeof(Private_Data),
93 NULL,
94 NULL,
95 _class_constructor, 93 _class_constructor,
96 NULL 94 NULL
97}; 95};
diff --git a/legacy/eobj/examples/mixin/mixin.c b/legacy/eobj/examples/mixin/mixin.c
index f1b112ce89..e643d2a83d 100644
--- a/legacy/eobj/examples/mixin/mixin.c
+++ b/legacy/eobj/examples/mixin/mixin.c
@@ -20,21 +20,23 @@ _ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
20} 20}
21 21
22static void 22static void
23_constructor(Eo *obj, void *class_data EINA_UNUSED) 23_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
24{ 24{
25 eo_constructor_super(obj); 25 eo_do_super(obj, eo_constructor());
26} 26}
27 27
28static void 28static void
29_destructor(Eo *obj, void *class_data EINA_UNUSED) 29_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
30{ 30{
31 eo_destructor_super(obj); 31 eo_do_super(obj, eo_destructor());
32} 32}
33 33
34static void 34static void
35_class_constructor(Eo_Class *klass) 35_class_constructor(Eo_Class *klass)
36{ 36{
37 const Eo_Op_Func_Description func_desc[] = { 37 const Eo_Op_Func_Description func_desc[] = {
38 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
39 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
38 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), 40 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
39 EO_OP_FUNC_SENTINEL 41 EO_OP_FUNC_SENTINEL
40 }; 42 };
@@ -54,8 +56,6 @@ static const Eo_Class_Description class_desc = {
54 EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST), 56 EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),
55 NULL, 57 NULL,
56 0, 58 0,
57 _constructor,
58 _destructor,
59 _class_constructor, 59 _class_constructor,
60 NULL 60 NULL
61}; 61};
diff --git a/legacy/eobj/examples/mixin/mixin2.c b/legacy/eobj/examples/mixin/mixin2.c
index 2244ffdd96..f47c438070 100644
--- a/legacy/eobj/examples/mixin/mixin2.c
+++ b/legacy/eobj/examples/mixin/mixin2.c
@@ -29,21 +29,23 @@ _ab_sum_get(const Eo *obj, const void *class_data, va_list *list)
29} 29}
30 30
31static void 31static void
32_constructor(Eo *obj, void *class_data EINA_UNUSED) 32_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
33{ 33{
34 eo_constructor_super(obj); 34 eo_do_super(obj, eo_constructor());
35} 35}
36 36
37static void 37static void
38_destructor(Eo *obj, void *class_data EINA_UNUSED) 38_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
39{ 39{
40 eo_destructor_super(obj); 40 eo_do_super(obj, eo_destructor());
41} 41}
42 42
43static void 43static void
44_class_constructor(Eo_Class *klass) 44_class_constructor(Eo_Class *klass)
45{ 45{
46 const Eo_Op_Func_Description func_desc[] = { 46 const Eo_Op_Func_Description func_desc[] = {
47 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
48 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
47 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), 49 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
48 EO_OP_FUNC_SENTINEL 50 EO_OP_FUNC_SENTINEL
49 }; 51 };
@@ -57,8 +59,6 @@ static const Eo_Class_Description class_desc = {
57 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 59 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
58 NULL, 60 NULL,
59 sizeof(Mixin2_Public_Data), 61 sizeof(Mixin2_Public_Data),
60 _constructor,
61 _destructor,
62 _class_constructor, 62 _class_constructor,
63 NULL 63 NULL
64}; 64};
diff --git a/legacy/eobj/examples/mixin/mixin3.c b/legacy/eobj/examples/mixin/mixin3.c
index c1821f9a7b..46a3d7cbf0 100644
--- a/legacy/eobj/examples/mixin/mixin3.c
+++ b/legacy/eobj/examples/mixin/mixin3.c
@@ -29,21 +29,23 @@ _ab_sum_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
29} 29}
30 30
31static void 31static void
32_constructor(Eo *obj, void *class_data EINA_UNUSED) 32_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
33{ 33{
34 eo_constructor_super(obj); 34 eo_do_super(obj, eo_constructor());
35} 35}
36 36
37static void 37static void
38_destructor(Eo *obj, void *class_data EINA_UNUSED) 38_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
39{ 39{
40 eo_destructor_super(obj); 40 eo_do_super(obj, eo_destructor());
41} 41}
42 42
43static void 43static void
44_class_constructor(Eo_Class *klass) 44_class_constructor(Eo_Class *klass)
45{ 45{
46 const Eo_Op_Func_Description func_desc[] = { 46 const Eo_Op_Func_Description func_desc[] = {
47 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
48 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
47 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get), 49 EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_AB_SUM_GET), _ab_sum_get),
48 EO_OP_FUNC_SENTINEL 50 EO_OP_FUNC_SENTINEL
49 }; 51 };
@@ -57,8 +59,6 @@ static const Eo_Class_Description class_desc = {
57 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 59 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
58 NULL, 60 NULL,
59 sizeof(Mixin3_Public_Data), 61 sizeof(Mixin3_Public_Data),
60 _constructor,
61 _destructor,
62 _class_constructor, 62 _class_constructor,
63 NULL 63 NULL
64}; 64};
diff --git a/legacy/eobj/examples/mixin/simple.c b/legacy/eobj/examples/mixin/simple.c
index 347e3b5f0a..c0c3b79d38 100644
--- a/legacy/eobj/examples/mixin/simple.c
+++ b/legacy/eobj/examples/mixin/simple.c
@@ -67,8 +67,6 @@ static const Eo_Class_Description class_desc = {
67 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 67 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
68 NULL, 68 NULL,
69 sizeof(Private_Data), 69 sizeof(Private_Data),
70 NULL,
71 NULL,
72 _class_constructor, 70 _class_constructor,
73 NULL 71 NULL
74}; 72};
diff --git a/legacy/eobj/examples/signals/simple.c b/legacy/eobj/examples/signals/simple.c
index ad68e33dcc..6bbd3bd7c8 100644
--- a/legacy/eobj/examples/signals/simple.c
+++ b/legacy/eobj/examples/signals/simple.c
@@ -63,9 +63,9 @@ _cb_deled(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_inf
63} 63}
64 64
65static void 65static void
66_constructor(Eo *obj, void *class_data EINA_UNUSED) 66_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
67{ 67{
68 eo_constructor_super(obj); 68 eo_do_super(obj, eo_constructor());
69 69
70 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL)); 70 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL));
71 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deled, NULL)); 71 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deled, NULL));
@@ -77,6 +77,7 @@ static void
77_class_constructor(Eo_Class *klass) 77_class_constructor(Eo_Class *klass)
78{ 78{
79 const Eo_Op_Func_Description func_desc[] = { 79 const Eo_Op_Func_Description func_desc[] = {
80 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
80 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), 81 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
81 EO_OP_FUNC_SENTINEL 82 EO_OP_FUNC_SENTINEL
82 }; 83 };
@@ -100,8 +101,6 @@ static const Eo_Class_Description class_desc = {
100 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 101 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
101 event_desc, 102 event_desc,
102 sizeof(Private_Data), 103 sizeof(Private_Data),
103 _constructor,
104 NULL,
105 _class_constructor, 104 _class_constructor,
106 NULL 105 NULL
107}; 106};
diff --git a/legacy/eobj/lib/Eo.h b/legacy/eobj/lib/Eo.h
index e0d8d82fa6..04e9a0cbb9 100644
--- a/legacy/eobj/lib/Eo.h
+++ b/legacy/eobj/lib/Eo.h
@@ -252,6 +252,7 @@ class_get_func_name(void) \
252 return _my_class; \ 252 return _my_class; \
253 } \ 253 } \
254 eina_lock_release(&_eo_class_creation_lock); \ 254 eina_lock_release(&_eo_class_creation_lock); \
255 (void) parent_class; \
255 _my_class = eo_class_new(class_desc, id, parent_class, __VA_ARGS__); \ 256 _my_class = eo_class_new(class_desc, id, parent_class, __VA_ARGS__); \
256 eina_lock_release(&_my_lock); \ 257 eina_lock_release(&_my_lock); \
257 \ 258 \
@@ -369,8 +370,6 @@ struct _Eo_Class_Description
369 } ops; /**< The ops description, should be filled using #EO_CLASS_DESCRIPTION_OPS */ 370 } ops; /**< The ops description, should be filled using #EO_CLASS_DESCRIPTION_OPS */
370 const Eo_Event_Description **events; /**< The event descriptions for this class. */ 371 const Eo_Event_Description **events; /**< The event descriptions for this class. */
371 size_t data_size; /**< The size of data (private + protected + public) this class needs per object. */ 372 size_t data_size; /**< The size of data (private + protected + public) this class needs per object. */
372 void (*constructor)(Eo *obj, void *class_data); /**< The constructor of the object. */
373 void (*destructor)(Eo *obj, void *class_data); /**< The destructor of the object. */
374 void (*class_constructor)(Eo_Class *klass); /**< The constructor of the class. */ 373 void (*class_constructor)(Eo_Class *klass); /**< The constructor of the class. */
375 void (*class_destructor)(Eo_Class *klass); /**< The destructor of the class. */ 374 void (*class_destructor)(Eo_Class *klass); /**< The destructor of the class. */
376}; 375};
@@ -620,22 +619,6 @@ EAPI Eina_Bool eo_class_do_super_internal(const Eo_Class *klass, Eo_Op op, ...);
620EAPI const Eo_Class *eo_class_get(const Eo *obj); 619EAPI const Eo_Class *eo_class_get(const Eo *obj);
621 620
622/** 621/**
623 * @brief Calls the super constructor of the object passed.
624 * @param obj the object to work on.
625 *
626 * @see eo_destructor_super()
627 */
628EAPI void eo_constructor_super(Eo *obj);
629
630/**
631 * @brief Calls the super destructor of the object passed.
632 * @param obj the object to work on.
633 *
634 * @see eo_constructor_super()
635 */
636EAPI void eo_destructor_super(Eo *obj);
637
638/**
639 * @def eo_error_set 622 * @def eo_error_set
640 * @brief Notify eo that there was an error when constructing, destructing or calling a function of the object. 623 * @brief Notify eo that there was an error when constructing, destructing or calling a function of the object.
641 * @param obj the object to work on. 624 * @param obj the object to work on.
@@ -853,7 +836,7 @@ EAPI void eo_manual_free(Eo *obj);
853 * @brief Use #EO_BASE_CLASS 836 * @brief Use #EO_BASE_CLASS
854 * @internal 837 * @internal
855 * */ 838 * */
856EAPI const Eo_Class *eo_base_class_get(void) EINA_CONST; 839EAPI const Eo_Class *eo_base_class_get(void);
857 840
858/** 841/**
859 * @typedef eo_base_data_free_func 842 * @typedef eo_base_data_free_func
@@ -874,6 +857,8 @@ typedef void (*eo_base_data_free_func)(void *);
874#define EO_BASE_BASE_ID EO_CLASS_ID_TO_BASE_ID(EO_BASE_CLASS_ID) 857#define EO_BASE_BASE_ID EO_CLASS_ID_TO_BASE_ID(EO_BASE_CLASS_ID)
875 858
876enum { 859enum {
860 EO_BASE_SUB_ID_CONSTRUCTOR,
861 EO_BASE_SUB_ID_DESTRUCTOR,
877 EO_BASE_SUB_ID_DATA_SET, 862 EO_BASE_SUB_ID_DATA_SET,
878 EO_BASE_SUB_ID_DATA_GET, 863 EO_BASE_SUB_ID_DATA_GET,
879 EO_BASE_SUB_ID_DATA_DEL, 864 EO_BASE_SUB_ID_DATA_DEL,
@@ -972,6 +957,26 @@ enum {
972 } while (0) 957 } while (0)
973 958
974/** 959/**
960 * @def eo_constructor
961 * @brief Call the object's constructor.
962 *
963 * Should not be used with #eo_do. Only use it with #eo_do_super.
964 *
965 * @see #eo_destructor
966 */
967#define eo_constructor() EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR)
968
969/**
970 * @def eo_destructor
971 * @brief Call the object's destructor.
972 *
973 * Should not be used with #eo_do. Only use it with #eo_do_super.
974 *
975 * @see #eo_constructor
976 */
977#define eo_destructor() EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR)
978
979/**
975 * @addtogroup Eo_Events Eo's Event Handling 980 * @addtogroup Eo_Events Eo's Event Handling
976 * @{ 981 * @{
977 */ 982 */
diff --git a/legacy/eobj/lib/eo.c b/legacy/eobj/lib/eo.c
index 63735f4570..a3f5125411 100644
--- a/legacy/eobj/lib/eo.c
+++ b/legacy/eobj/lib/eo.c
@@ -16,8 +16,7 @@ static Eo_Class **_eo_classes;
16static Eo_Class_Id _eo_classes_last_id; 16static Eo_Class_Id _eo_classes_last_id;
17static Eina_Bool _eo_init_count = 0; 17static Eina_Bool _eo_init_count = 0;
18 18
19static void _eo_constructor(Eo *obj, const Eo_Class *klass); 19static void _eo_condtor_reset(Eo *obj);
20static void _eo_destructor(Eo *obj, const Eo_Class *klass);
21static inline Eina_Bool _eo_error_get(const Eo *obj); 20static inline Eina_Bool _eo_error_get(const Eo *obj);
22static inline void _eo_error_unset(Eo *obj); 21static inline void _eo_error_unset(Eo *obj);
23static inline void *_eo_data_get(const Eo *obj, const Eo_Class *klass); 22static inline void *_eo_data_get(const Eo *obj, const Eo_Class *klass);
@@ -45,9 +44,11 @@ struct _Eo {
45 44
46 Eo_Kls_Itr mro_itr; 45 Eo_Kls_Itr mro_itr;
47 46
47 Eina_Bool construct_error:1;
48 Eina_Bool condtor_done:1;
49
48 Eina_Bool composite:1; 50 Eina_Bool composite:1;
49 Eina_Bool del:1; 51 Eina_Bool del:1;
50 Eina_Bool construct_error:1;
51 Eina_Bool manual_free:1; 52 Eina_Bool manual_free:1;
52}; 53};
53 54
@@ -279,7 +280,7 @@ _eo_kls_itr_init(const Eo_Class *obj_klass, Eo_Kls_Itr *cur, Eo_Op op, Eo_Kls_It
279 prev_state->kls_itr = cur->kls_itr; 280 prev_state->kls_itr = cur->kls_itr;
280 281
281 /* If we are in a constructor/destructor or we changed an op - init. */ 282 /* If we are in a constructor/destructor or we changed an op - init. */
282 if ((op == EO_NOOP) || (cur->op != op)) 283 if ((cur->op == EO_NOOP) || (cur->op != op))
283 { 284 {
284 cur->op = op; 285 cur->op = op;
285 cur->kls_itr = obj_klass->mro; 286 cur->kls_itr = obj_klass->mro;
@@ -317,17 +318,10 @@ _eo_kls_itr_next(Eo_Kls_Itr *cur, Eo_Op op)
317 const Eo_Class **kls_itr = cur->kls_itr; 318 const Eo_Class **kls_itr = cur->kls_itr;
318 if (*kls_itr) 319 if (*kls_itr)
319 { 320 {
320 if (op != EO_NOOP) 321 const op_type_funcs *fsrc = _dich_func_get(*kls_itr, op);
321 {
322 const op_type_funcs *fsrc = _dich_func_get(*kls_itr, op);
323 322
324 while (*kls_itr && (*(kls_itr++) != fsrc->src)) 323 while (*kls_itr && (*(kls_itr++) != fsrc->src))
325 ; 324 ;
326 }
327 else
328 {
329 kls_itr++;
330 }
331 325
332 cur->kls_itr = kls_itr; 326 cur->kls_itr = kls_itr;
333 return *kls_itr; 327 return *kls_itr;
@@ -338,13 +332,6 @@ _eo_kls_itr_next(Eo_Kls_Itr *cur, Eo_Op op)
338 } 332 }
339} 333}
340 334
341static inline Eina_Bool
342_eo_kls_itr_reached_end(const Eo_Kls_Itr *cur)
343{
344 const Eo_Class **kls_itr = cur->kls_itr;
345 return !(*kls_itr && *(kls_itr + 1));
346}
347
348static inline const op_type_funcs * 335static inline const op_type_funcs *
349_eo_kls_itr_func_get(const Eo_Class *klass, Eo_Kls_Itr *mro_itr, Eo_Op op, Eo_Kls_Itr *prev_state) 336_eo_kls_itr_func_get(const Eo_Class *klass, Eo_Kls_Itr *mro_itr, Eo_Op op, Eo_Kls_Itr *prev_state)
350{ 337{
@@ -883,8 +870,6 @@ eo_class_new(const Eo_Class_Description *desc, Eo_Class_Id id, const Eo_Class *p
883 /* Check restrictions on Interface types. */ 870 /* Check restrictions on Interface types. */
884 if (desc->type == EO_CLASS_TYPE_INTERFACE) 871 if (desc->type == EO_CLASS_TYPE_INTERFACE)
885 { 872 {
886 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->constructor, NULL);
887 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->destructor, NULL);
888 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->class_constructor, NULL); 873 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->class_constructor, NULL);
889 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->class_destructor, NULL); 874 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->class_destructor, NULL);
890 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->data_size, NULL); 875 EINA_SAFETY_ON_FALSE_RETURN_VAL(!desc->data_size, NULL);
@@ -1135,9 +1120,10 @@ eo_add(const Eo_Class *klass, Eo *parent)
1135 1120
1136 _eo_kls_itr_init(klass, &obj->mro_itr, EO_NOOP, &prev_state); 1121 _eo_kls_itr_init(klass, &obj->mro_itr, EO_NOOP, &prev_state);
1137 _eo_error_unset(obj); 1122 _eo_error_unset(obj);
1123 _eo_condtor_reset(obj);
1138 1124
1139 _eo_ref(obj); 1125 _eo_ref(obj);
1140 _eo_constructor(obj, klass); 1126 eo_do(obj, eo_constructor());
1141 1127
1142 if (EINA_UNLIKELY(_eo_error_get(obj))) 1128 if (EINA_UNLIKELY(_eo_error_get(obj)))
1143 { 1129 {
@@ -1145,7 +1131,7 @@ eo_add(const Eo_Class *klass, Eo *parent)
1145 goto fail; 1131 goto fail;
1146 } 1132 }
1147 1133
1148 if (EINA_UNLIKELY(!_eo_kls_itr_reached_end(&obj->mro_itr))) 1134 if (!obj->condtor_done)
1149 { 1135 {
1150 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr); 1136 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr);
1151 ERR("Object of class '%s' - Not all of the object constructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name); 1137 ERR("Object of class '%s' - Not all of the object constructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name);
@@ -1252,13 +1238,15 @@ _eo_del_internal(Eo *obj)
1252 1238
1253 _eo_kls_itr_init(klass, &obj->mro_itr, EO_NOOP, &prev_state); 1239 _eo_kls_itr_init(klass, &obj->mro_itr, EO_NOOP, &prev_state);
1254 _eo_error_unset(obj); 1240 _eo_error_unset(obj);
1255 _eo_destructor(obj, klass); 1241 _eo_condtor_reset(obj);
1242
1243 eo_do(obj, eo_destructor());
1256 if (_eo_error_get(obj)) 1244 if (_eo_error_get(obj))
1257 { 1245 {
1258 ERR("Object of class '%s' - One of the object destructors have failed.", klass->desc->name); 1246 ERR("Object of class '%s' - One of the object destructors have failed.", klass->desc->name);
1259 } 1247 }
1260 1248
1261 if (!_eo_kls_itr_reached_end(&obj->mro_itr)) 1249 if (!obj->condtor_done)
1262 { 1250 {
1263 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr); 1251 const Eo_Class *cur_klass = _eo_kls_itr_get(&obj->mro_itr);
1264 ERR("Object of class '%s' - Not all of the object destructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name); 1252 ERR("Object of class '%s' - Not all of the object destructors have been executed, last destructor was of class: '%s'", klass->desc->name, cur_klass->desc->name);
@@ -1370,6 +1358,18 @@ _eo_error_unset(Eo *obj)
1370 obj->construct_error = EINA_FALSE; 1358 obj->construct_error = EINA_FALSE;
1371} 1359}
1372 1360
1361void
1362_eo_condtor_done(Eo *obj)
1363{
1364 obj->condtor_done = EINA_TRUE;
1365}
1366
1367static void
1368_eo_condtor_reset(Eo *obj)
1369{
1370 obj->condtor_done = EINA_FALSE;
1371}
1372
1373/** 1373/**
1374 * @internal 1374 * @internal
1375 * @brief Check if there was an error when constructing, destructing or calling a function of the object. 1375 * @brief Check if there was an error when constructing, destructing or calling a function of the object.
@@ -1382,58 +1382,6 @@ _eo_error_get(const Eo *obj)
1382 return obj->construct_error; 1382 return obj->construct_error;
1383} 1383}
1384 1384
1385static inline void
1386_eo_constructor_default(Eo *obj)
1387{
1388 eo_constructor_super(obj);
1389}
1390
1391static inline void
1392_eo_destructor_default(Eo *obj)
1393{
1394 eo_destructor_super(obj);
1395}
1396
1397static void
1398_eo_constructor(Eo *obj, const Eo_Class *klass)
1399{
1400 if (!klass)
1401 return;
1402
1403 if (klass->desc->constructor)
1404 klass->desc->constructor(obj, _eo_data_get(obj, klass));
1405 else
1406 _eo_constructor_default(obj);
1407}
1408
1409static void
1410_eo_destructor(Eo *obj, const Eo_Class *klass)
1411{
1412 if (!klass)
1413 return;
1414
1415 if (klass->desc->destructor)
1416 klass->desc->destructor(obj, _eo_data_get(obj, klass));
1417 else
1418 _eo_destructor_default(obj);
1419}
1420
1421EAPI void
1422eo_constructor_super(Eo *obj)
1423{
1424 EO_MAGIC_RETURN(obj, EO_EINA_MAGIC);
1425
1426 _eo_constructor(obj, _eo_kls_itr_next(&obj->mro_itr, EO_NOOP));
1427}
1428
1429EAPI void
1430eo_destructor_super(Eo *obj)
1431{
1432 EO_MAGIC_RETURN(obj, EO_EINA_MAGIC);
1433
1434 _eo_destructor(obj, _eo_kls_itr_next(&obj->mro_itr, EO_NOOP));
1435}
1436
1437static inline void * 1385static inline void *
1438_eo_data_get(const Eo *obj, const Eo_Class *klass) 1386_eo_data_get(const Eo *obj, const Eo_Class *klass)
1439{ 1387{
diff --git a/legacy/eobj/lib/eo_base_class.c b/legacy/eobj/lib/eo_base_class.c
index a90d37ab60..ffb88587d4 100644
--- a/legacy/eobj/lib/eo_base_class.c
+++ b/legacy/eobj/lib/eo_base_class.c
@@ -484,19 +484,23 @@ EAPI const Eo_Event_Description _EO_EV_DEL =
484 EO_EVENT_DESCRIPTION("del", "Obj is being deleted."); 484 EO_EVENT_DESCRIPTION("del", "Obj is being deleted.");
485 485
486static void 486static void
487_constructor(Eo *obj, void *class_data EINA_UNUSED) 487_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
488{ 488{
489 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS)); 489 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS));
490
491 _eo_condtor_done(obj);
490} 492}
491 493
492static void 494static void
493_destructor(Eo *obj, void *class_data) 495_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
494{ 496{
495 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS)); 497 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS));
496 498
497 _eo_generic_data_del_all(class_data); 499 _eo_generic_data_del_all(class_data);
498 _wref_destruct(class_data); 500 _wref_destruct(class_data);
499 _eo_callback_remove_all(class_data); 501 _eo_callback_remove_all(class_data);
502
503 _eo_condtor_done(obj);
500} 504}
501 505
502static void 506static void
@@ -505,6 +509,8 @@ _class_constructor(Eo_Class *klass)
505 event_freeze_count = 0; 509 event_freeze_count = 0;
506 510
507 const Eo_Op_Func_Description func_desc[] = { 511 const Eo_Op_Func_Description func_desc[] = {
512 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
513 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
508 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_SET), _data_set), 514 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_SET), _data_set),
509 EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get), 515 EO_OP_FUNC_CONST(EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), _data_get),
510 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_DEL), _data_del), 516 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DATA_DEL), _data_del),
@@ -528,6 +534,8 @@ _class_constructor(Eo_Class *klass)
528} 534}
529 535
530static const Eo_Op_Description op_desc[] = { 536static const Eo_Op_Description op_desc[] = {
537 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_CONSTRUCTOR, "Constructor"),
538 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DESTRUCTOR, "Destructor"),
531 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_SET, "Set data for key."), 539 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_SET, "Set data for key."),
532 EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_DATA_GET, "Get data for key."), 540 EO_OP_DESCRIPTION_CONST(EO_BASE_SUB_ID_DATA_GET, "Get data for key."),
533 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_DEL, "Del key."), 541 EO_OP_DESCRIPTION(EO_BASE_SUB_ID_DATA_DEL, "Del key."),
@@ -560,8 +568,6 @@ static const Eo_Class_Description class_desc = {
560 EO_CLASS_DESCRIPTION_OPS(NULL, op_desc, EO_BASE_SUB_ID_LAST), 568 EO_CLASS_DESCRIPTION_OPS(NULL, op_desc, EO_BASE_SUB_ID_LAST),
561 event_desc, 569 event_desc,
562 sizeof(Private_Data), 570 sizeof(Private_Data),
563 _constructor,
564 _destructor,
565 _class_constructor, 571 _class_constructor,
566 NULL 572 NULL
567}; 573};
diff --git a/legacy/eobj/lib/eo_private.h b/legacy/eobj/lib/eo_private.h
index 631ce01c6a..7759a2af5b 100644
--- a/legacy/eobj/lib/eo_private.h
+++ b/legacy/eobj/lib/eo_private.h
@@ -54,5 +54,7 @@ extern int _eo_log_dom;
54#endif 54#endif
55#define DBG(...) EINA_LOG_DOM_DBG(_eo_log_dom, __VA_ARGS__) 55#define DBG(...) EINA_LOG_DOM_DBG(_eo_log_dom, __VA_ARGS__)
56 56
57void _eo_condtor_done(Eo *obj);
58
57#endif 59#endif
58 60
diff --git a/legacy/eobj/tests/class_simple.c b/legacy/eobj/tests/class_simple.c
index 58d6d290ec..866a336754 100644
--- a/legacy/eobj/tests/class_simple.c
+++ b/legacy/eobj/tests/class_simple.c
@@ -58,8 +58,6 @@ static const Eo_Class_Description class_desc = {
58 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), 58 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
59 NULL, 59 NULL,
60 sizeof(Simple_Public_Data), 60 sizeof(Simple_Public_Data),
61 NULL,
62 NULL,
63 _class_constructor, 61 _class_constructor,
64 NULL 62 NULL
65}; 63};
diff --git a/legacy/eobj/tests/eo_test_class_errors.c b/legacy/eobj/tests/eo_test_class_errors.c
index fcafc4fee6..4f503361f1 100644
--- a/legacy/eobj/tests/eo_test_class_errors.c
+++ b/legacy/eobj/tests/eo_test_class_errors.c
@@ -40,8 +40,6 @@ START_TEST(eo_incomplete_desc)
40 NULL, 40 NULL,
41 0, 41 0,
42 NULL, 42 NULL,
43 NULL,
44 NULL,
45 NULL 43 NULL
46 }; 44 };
47 45
@@ -108,8 +106,6 @@ START_TEST(eo_inherit_errors)
108 NULL, 106 NULL,
109 0, 107 0,
110 NULL, 108 NULL,
111 NULL,
112 NULL,
113 NULL 109 NULL
114 }; 110 };
115 111
@@ -120,8 +116,6 @@ START_TEST(eo_inherit_errors)
120 NULL, 116 NULL,
121 0, 117 0,
122 NULL, 118 NULL,
123 NULL,
124 NULL,
125 NULL 119 NULL
126 }; 120 };
127 121
@@ -132,8 +126,6 @@ START_TEST(eo_inherit_errors)
132 NULL, 126 NULL,
133 0, 127 0,
134 NULL, 128 NULL,
135 NULL,
136 NULL,
137 NULL 129 NULL
138 }; 130 };
139 131
@@ -173,8 +165,6 @@ START_TEST(eo_inconsistent_mro)
173 NULL, 165 NULL,
174 0, 166 0,
175 NULL, 167 NULL,
176 NULL,
177 NULL,
178 NULL 168 NULL
179 }; 169 };
180 170
@@ -185,8 +175,6 @@ START_TEST(eo_inconsistent_mro)
185 NULL, 175 NULL,
186 0, 176 0,
187 NULL, 177 NULL,
188 NULL,
189 NULL,
190 NULL 178 NULL
191 }; 179 };
192 180
@@ -197,8 +185,6 @@ START_TEST(eo_inconsistent_mro)
197 NULL, 185 NULL,
198 0, 186 0,
199 NULL, 187 NULL,
200 NULL,
201 NULL,
202 NULL 188 NULL
203 }; 189 };
204 190
@@ -209,8 +195,6 @@ START_TEST(eo_inconsistent_mro)
209 NULL, 195 NULL,
210 0, 196 0,
211 NULL, 197 NULL,
212 NULL,
213 NULL,
214 NULL 198 NULL
215 }; 199 };
216 200
@@ -236,7 +220,6 @@ START_TEST(eo_inconsistent_mro)
236} 220}
237END_TEST 221END_TEST
238 222
239static void _stub_constructor(Eo *obj EINA_UNUSED, void *data EINA_UNUSED) {}
240static void _stub_class_constructor(Eo_Class *klass EINA_UNUSED) {} 223static void _stub_class_constructor(Eo_Class *klass EINA_UNUSED) {}
241 224
242START_TEST(eo_bad_interface) 225START_TEST(eo_bad_interface)
@@ -252,8 +235,6 @@ START_TEST(eo_bad_interface)
252 NULL, 235 NULL,
253 10, 236 10,
254 NULL, 237 NULL,
255 NULL,
256 NULL,
257 NULL 238 NULL
258 }; 239 };
259 240
@@ -261,18 +242,6 @@ START_TEST(eo_bad_interface)
261 fail_if(klass); 242 fail_if(klass);
262 243
263 class_desc.data_size = 0; 244 class_desc.data_size = 0;
264 class_desc.constructor = _stub_constructor;
265
266 klass = eo_class_new(&class_desc, 0, NULL, NULL);
267 fail_if(klass);
268
269 class_desc.constructor = NULL;
270 class_desc.destructor = _stub_constructor;
271
272 klass = eo_class_new(&class_desc, 0, NULL, NULL);
273 fail_if(klass);
274
275 class_desc.destructor = NULL;
276 class_desc.class_constructor = _stub_class_constructor; 245 class_desc.class_constructor = _stub_class_constructor;
277 246
278 klass = eo_class_new(&class_desc, 0, NULL, NULL); 247 klass = eo_class_new(&class_desc, 0, NULL, NULL);
@@ -343,8 +312,6 @@ START_TEST(eo_op_types)
343 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 312 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
344 NULL, 313 NULL,
345 0, 314 0,
346 NULL,
347 NULL,
348 _const_ops_class_constructor, 315 _const_ops_class_constructor,
349 NULL 316 NULL
350 }; 317 };
diff --git a/legacy/eobj/tests/eo_test_general.c b/legacy/eobj/tests/eo_test_general.c
index c37bf3d74e..bba143cfce 100644
--- a/legacy/eobj/tests/eo_test_general.c
+++ b/legacy/eobj/tests/eo_test_general.c
@@ -31,8 +31,6 @@ START_TEST(eo_data_fetch)
31 NULL, 31 NULL,
32 10, 32 10,
33 NULL, 33 NULL,
34 NULL,
35 NULL,
36 NULL 34 NULL
37 }; 35 };
38 36
@@ -96,8 +94,6 @@ START_TEST(eo_static_classes)
96 NULL, 94 NULL,
97 0, 95 0,
98 NULL, 96 NULL,
99 NULL,
100 NULL,
101 NULL 97 NULL
102 }; 98 };
103 99
@@ -114,18 +110,36 @@ START_TEST(eo_static_classes)
114} 110}
115END_TEST 111END_TEST
116 112
113static Eina_Bool _man_should_con = EINA_TRUE;
114static Eina_Bool _man_should_des = EINA_TRUE;
115
117static void 116static void
118_man_con(Eo *obj, void *data EINA_UNUSED) 117_man_con(Eo *obj, void *data EINA_UNUSED, va_list *list EINA_UNUSED)
119{ 118{
120 eo_manual_free_set(obj, EINA_TRUE); 119 if (_man_should_con)
121 eo_constructor_super(obj); 120 eo_manual_free_set(obj, EINA_TRUE);
121 eo_do_super(obj, eo_constructor());
122}
123
124static void
125_man_des(Eo *obj, void *data EINA_UNUSED, va_list *list EINA_UNUSED)
126{
127 eo_do_super(obj, eo_destructor());
128 if (_man_should_des)
129 eo_manual_free_set(obj, EINA_FALSE);
122} 130}
123 131
132
124static void 133static void
125_man_des(Eo *obj, void *data EINA_UNUSED) 134_man_class_constructor(Eo_Class *klass)
126{ 135{
127 eo_destructor_super(obj); 136 const Eo_Op_Func_Description func_desc[] = {
128 eo_manual_free_set(obj, EINA_FALSE); 137 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _man_con),
138 EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _man_des),
139 EO_OP_FUNC_SENTINEL
140 };
141
142 eo_class_funcs_set(klass, func_desc);
129} 143}
130 144
131START_TEST(eo_man_free) 145START_TEST(eo_man_free)
@@ -139,9 +153,7 @@ START_TEST(eo_man_free)
139 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 153 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
140 NULL, 154 NULL,
141 10, 155 10,
142 _man_con, 156 _man_class_constructor,
143 _man_des,
144 NULL,
145 NULL 157 NULL
146 }; 158 };
147 159
@@ -157,7 +169,7 @@ START_TEST(eo_man_free)
157 eo_manual_free(obj); 169 eo_manual_free(obj);
158 eo_unref(obj); 170 eo_unref(obj);
159 171
160 class_desc.destructor = NULL; 172 _man_should_des = EINA_FALSE;
161 klass = eo_class_new(&class_desc, 0, EO_BASE_CLASS, NULL); 173 klass = eo_class_new(&class_desc, 0, EO_BASE_CLASS, NULL);
162 fail_if(!klass); 174 fail_if(!klass);
163 175
@@ -172,7 +184,7 @@ START_TEST(eo_man_free)
172 eo_unref(obj); 184 eo_unref(obj);
173 eo_manual_free(obj); 185 eo_manual_free(obj);
174 186
175 class_desc.constructor = NULL; 187 _man_should_con = EINA_FALSE;
176 klass = eo_class_new(&class_desc, 0, EO_BASE_CLASS, NULL); 188 klass = eo_class_new(&class_desc, 0, EO_BASE_CLASS, NULL);
177 fail_if(!klass); 189 fail_if(!klass);
178 190
@@ -360,8 +372,6 @@ START_TEST(eo_op_errors)
360 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0), 372 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
361 NULL, 373 NULL,
362 0, 374 0,
363 NULL,
364 NULL,
365 _op_errors_class_constructor, 375 _op_errors_class_constructor,
366 NULL 376 NULL
367 }; 377 };
@@ -525,9 +535,6 @@ START_TEST(eo_magic_checks)
525 535
526 eo_error_set((Eo *) buf); 536 eo_error_set((Eo *) buf);
527 537
528 eo_constructor_super((Eo *) buf);
529 eo_destructor_super((Eo *) buf);
530
531 fail_if(eo_data_get((Eo *) buf, SIMPLE_CLASS)); 538 fail_if(eo_data_get((Eo *) buf, SIMPLE_CLASS));
532 539
533 eo_composite_object_attach((Eo *) buf, obj); 540 eo_composite_object_attach((Eo *) buf, obj);