diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 5cfeda698e..509b10966c 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -318,10 +318,15 @@ _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = class_data; - Evas *eo_e = evas_object_evas_get(eo_parent_get(eo_obj)); + Evas *eo_e; + Eo *parent; Evas_Colorspace cspace; eo_do_super(eo_obj, MY_CLASS, eo_constructor()); + + eo_do(eo_obj, eo_parent_get(&parent)); + eo_e = evas_object_evas_get(parent); + evas_object_image_init(eo_obj); evas_object_inject(eo_obj, obj, eo_e); diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c index e9fe8ae6aa..621a43e16e 100644 --- a/src/lib/evas/canvas/evas_object_line.c +++ b/src/lib/evas/canvas/evas_object_line.c @@ -244,13 +244,18 @@ evas_object_line_init(Evas_Object *eo_obj) static void _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) { + Evas_Object_Protected_Data *obj; + Evas_Object_Line *o; + Eo *parent; + eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_line_init(eo_obj); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + eo_do(eo_obj, eo_parent_get(&parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); - Evas_Object_Line *o = class_data; + o = class_data; /* alloc obj private data */ o->cur.x1 = 0; o->cur.y1 = 0; diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 0af611c7a7..27fc7adfe4 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -607,7 +607,7 @@ evas_object_del(Evas_Object *eo_obj) obj->eo_del_called = EINA_TRUE; - eo_parent_set(eo_obj, NULL); + eo_do(eo_obj, eo_parent_set(NULL)); // eo_del(eo_obj); } diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c index 6a09fbfb1e..618a029472 100644 --- a/src/lib/evas/canvas/evas_object_polygon.c +++ b/src/lib/evas/canvas/evas_object_polygon.c @@ -109,11 +109,15 @@ evas_object_polygon_add(Evas *e) static void _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) { + Evas_Object_Protected_Data *obj; + Eo *parent; + eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_polygon_init(eo_obj); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + eo_do(eo_obj, eo_parent_get(&parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); } EAPI void diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c index 785c05346a..36ebb21645 100644 --- a/src/lib/evas/canvas/evas_object_rectangle.c +++ b/src/lib/evas/canvas/evas_object_rectangle.c @@ -97,11 +97,15 @@ evas_object_rectangle_add(Evas *e) static void _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) { + Eo *parent; + eo_do_super(eo_obj, MY_CLASS, eo_constructor()); Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_rectangle_init(eo_obj); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + + eo_do(eo_obj, eo_parent_get(&parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); } /* all nice and private */ diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index f3f26311b3..b2d54c8661 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -661,15 +661,19 @@ evas_object_smart_add(Evas *eo_e, Evas_Smart *s) static void _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) { + Evas_Object_Protected_Data *obj; Evas_Object_Smart *smart; + Eo *parent; smart = class_data; smart->object = eo_obj; eo_do_super(eo_obj, MY_CLASS, eo_constructor()); evas_object_smart_init(eo_obj); - Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + eo_do(eo_obj, eo_parent_get(&parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); eo_do(eo_obj, evas_obj_type_set(MY_CLASS_NAME), evas_obj_smart_add()); diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 396bbc8822..8fae9da593 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -363,7 +363,10 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED eo_do_super(eo_obj, MY_CLASS, eo_constructor()); evas_object_text_init(eo_obj); Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + Eo *parent; + + eo_do(eo_obj, eo_parent_get(&parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); } EAPI void diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 13944fafde..cf242feabf 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5350,6 +5350,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Textblock *o; + Eo *eo_parent; eo_do_super(eo_obj, MY_CLASS, eo_constructor()); @@ -5362,7 +5363,9 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED o->cursor = calloc(1, sizeof(Evas_Textblock_Cursor)); _format_command_init(); evas_object_textblock_init(eo_obj); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + + eo_do(eo_obj, eo_parent_get(&eo_parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent)); } EAPI Evas_Textblock_Style * diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c index 78d13e6a8f..87634d4591 100644 --- a/src/lib/evas/canvas/evas_object_textgrid.c +++ b/src/lib/evas/canvas/evas_object_textgrid.c @@ -1043,11 +1043,15 @@ evas_object_textgrid_add(Evas *e) static void _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) { + Eo *eo_parent; + eo_do_super(eo_obj, MY_CLASS, eo_constructor()); Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_textgrid_init(eo_obj); - evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); + + eo_do(eo_obj, eo_parent_get(&eo_parent)); + evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent)); } EAPI void diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c index 592c0385ac..2b1bdb629a 100644 --- a/src/lib/evas/canvas/evas_out.c +++ b/src/lib/evas/canvas/evas_out.c @@ -31,9 +31,14 @@ static void _constructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Out_Public_Data *eo_dat = _pd; - Eo *eo_parent = eo_parent_get(eo_obj); - Evas_Public_Data *e = eo_data_scope_get(eo_parent, EVAS_CLASS); + Eo *eo_parent; + Evas_Public_Data *e; + + eo_do(eo_obj, eo_parent_get(&eo_parent)); + e = eo_data_scope_get(eo_parent, EVAS_CLASS); + eo_do_super(eo_obj, MY_CLASS, eo_constructor()); + if (!e) return; e->outputs = eina_list_append(e->outputs, eo_obj); if (e->engine.func->info) eo_dat->info = e->engine.func->info(eo_parent); @@ -52,8 +57,11 @@ static void _destructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Out_Public_Data *eo_dat = _pd; - Eo *eo_parent = eo_parent_get(eo_obj); - Evas_Public_Data *e = eo_data_scope_get(eo_parent, EVAS_CLASS); + Eo *eo_parent; + Evas_Public_Data *e; + + eo_do(eo_obj, eo_parent_get(&eo_parent)); + e = eo_data_scope_get(eo_parent, EVAS_CLASS); // XXX: need to free output and context one they get allocated one day // e->engine.func->context_free(eo_dat->output, eo_dat->context); // e->engine.func->output_free(eo_dat->output);