diff options
author | Cedric Bail <cedric@osg.samsung.com> | 2017-10-30 16:02:58 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2017-11-03 15:31:31 -0700 |
commit | a1e949746101c4d98224ee81c64937d10055a84f (patch) | |
tree | 2a12da597209c0ab517a93ee184d8b3ea893b1c2 | |
parent | e891a01749be7ff52a2937e1c08d90fc5f55808e (diff) | |
download | efl-a1e949746101c4d98224ee81c64937d10055a84f.tar.gz |
eo: refactor use of efl_replace.
-rw-r--r-- | src/lib/eo/eo.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 17da1115f9..91a62fe944 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -3390,22 +3390,12 @@ _eo_value_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem) return EINA_TRUE; } -static void -_eo_value_replace(Eo **dst, Eo * const *src) -{ - if (*src == *dst) return; - //ref *src first, since efl_unref(*dst) may trigger *src unref() - efl_ref(*src); - efl_unref(*dst); - *dst = *src; -} - static Eina_Bool _eo_value_vset(const Eina_Value_Type *type EINA_UNUSED, void *mem, va_list args) { Eo **dst = mem; Eo **src = va_arg(args, Eo **); - _eo_value_replace(dst, src); + efl_replace(dst, *src); return EINA_TRUE; } @@ -3415,7 +3405,7 @@ _eo_value_pset(const Eina_Value_Type *type EINA_UNUSED, { Eo **dst = mem; Eo * const *src = ptr; - _eo_value_replace(dst, src); + efl_replace(dst, *src); return EINA_TRUE; } |