/**
* Return source code of the current edje edit object.
*
+ * Remember to free the string with edje_edit_string_free()
+ *
* This function will return source code of the whole group, loaded previously.
* This function also will collect all possible resources that is required and
* mentioned in description blocks. For example: all images, fonts, data, styles,
Edje_Part_Description_Text *part_desc_text;
unsigned int i, j;
const char *entry;
- Eina_Strbuf *buf = eina_strbuf_new();
+ const char *str;
+ Eina_Strbuf *buf = NULL;
Eina_Bool ret = EINA_TRUE;
Eina_List *images = NULL, *color_classes = NULL, *styles = NULL, *fonts = NULL;
Eina_List *l;
}
}
+ buf = eina_strbuf_new();
+
/* if images were found, print them */
if (images)
{
if (!ret)
{
ERR("Generating EDC for This Group.");
+ eina_strbuf_free(buf);
return NULL;
}
/* return resulted source code of the group */
- return eina_strbuf_string_get(buf);
+ str = eina_stringshare_add(eina_strbuf_string_get(buf));
+ eina_strbuf_free(buf);
+ return str;
}
#undef COLLECT_RESOURCE