From 697f0a160009434045ea46249500c5a610f32288 Mon Sep 17 00:00:00 2001 From: tsauerbeck Date: Sat, 25 Feb 2006 09:56:09 +0000 Subject: [PATCH] the custom state code was still using strdup, but it needs to use the stringshare api SVN revision: 20774 --- legacy/edje/src/lib/edje_embryo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/legacy/edje/src/lib/edje_embryo.c b/legacy/edje/src/lib/edje_embryo.c index 8b73427e2d..488edf8372 100644 --- a/legacy/edje/src/lib/edje_embryo.c +++ b/legacy/edje/src/lib/edje_embryo.c @@ -1514,7 +1514,7 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params) *d = *parent; - d->state.name = strdup("custom"); + d->state.name = evas_stringshare_add("custom"); d->state.value = 0.0; /* make sure all the allocated memory is getting copied, @@ -1532,12 +1532,12 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params) d->image.tween_list = evas_list_append(d->image.tween_list, iid_new); } -#define STRDUP(x) x ? strdup(x) : NULL - d->color_class = STRDUP(d->color_class); - d->text.text = STRDUP(d->text.text); - d->text.text_class = STRDUP(d->text.text_class); - d->text.font = STRDUP(d->text.font); -#undef STRDUP +#define DUP(x) x ? evas_stringshare_add(x) : NULL + d->color_class = DUP(d->color_class); + d->text.text = DUP(d->text.text); + d->text.text_class = DUP(d->text.text_class); + d->text.font = DUP(d->text.font); +#undef DUP rp->custom.description = d;