summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_smart.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-10-13 10:54:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-10-13 10:57:00 +0900
commitccee1c0944bedf6c81cf40d0b3bcf42cd18cec66 (patch)
tree34b2b4a59f7c4946c87b4c5d7d2ebe3eda70dca2 /src/lib/evas/canvas/evas_object_smart.c
parent10b63836403ca8879f8f371b1ff60892e5ae3405 (diff)
eo: Simplify debug_name_override
Simply pass in the strbuf and don't expect the callee to own it. This makes things simpler and safer (it'll crash only if the callee frees said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming release, EFL 1.21. Realised this after talking with Amitesh. Thanks. See 999dbd9764426890c0e11841358f9219082b89b2 And c4769ff8989bab2b745017b843f073e5737e91e0
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 411bbef408..bbc9735ba4 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -720,7 +720,7 @@ _efl_canvas_group_efl_object_destructor(Eo *eo_obj, Evas_Smart_Data *o)
720 } 720 }
721} 721}
722 722
723EOLIAN static Eina_Strbuf * 723EOLIAN static void
724_efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data *o, Eina_Strbuf *sb) 724_efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data *o, Eina_Strbuf *sb)
725{ 725{
726 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 726 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
@@ -729,7 +729,7 @@ _efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data *o,
729 if (obj->smart.smart && obj->smart.smart->smart_class) 729 if (obj->smart.smart && obj->smart.smart->smart_class)
730 smart_class = obj->smart.smart->smart_class->name; 730 smart_class = obj->smart.smart->smart_class->name;
731 731
732 sb = efl_debug_name_override(efl_super(eo_obj, MY_CLASS), sb); 732 efl_debug_name_override(efl_super(eo_obj, MY_CLASS), sb);
733 if (smart_class) 733 if (smart_class)
734 { 734 {
735 eina_strbuf_append_printf(sb, ":children=%d:smart_class=%s", 735 eina_strbuf_append_printf(sb, ":children=%d:smart_class=%s",
@@ -739,7 +739,6 @@ _efl_canvas_group_efl_object_debug_name_override(Eo *eo_obj, Evas_Smart_Data *o,
739 { 739 {
740 eina_strbuf_append_printf(sb, ":children=%d", eina_inlist_count(o->contained)); 740 eina_strbuf_append_printf(sb, ":children=%d", eina_inlist_count(o->contained));
741 } 741 }
742 return sb;
743} 742}
744 743
745static inline void 744static inline void