this doesn't look right, we don't ref in other cases... On Tue, May 1, 2018 at 2:40 PM, Cedric BAIL <cedric.b...@free.fr> wrote: > cedric pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=b1883c7989355e95cd4c826d3c7ecdbbbd257d77 > > commit b1883c7989355e95cd4c826d3c7ecdbbbd257d77 > Author: Cedric BAIL <ced...@osg.samsung.com> > Date: Fri Apr 27 16:19:42 2018 -0700 > > eina: make eina_value_pget on an EINA_VALUE_TYPE_STRINGSHARE return a new > reference to a stringshare. > --- > src/lib/eina/eina_value.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c > index cb5fbc11c4..ddb02af48d 100644 > --- a/src/lib/eina/eina_value.c > +++ b/src/lib/eina/eina_value.c > @@ -2225,6 +2225,16 @@ _eina_value_type_stringshare_pset(const > Eina_Value_Type *type EINA_UNUSED, void > } > > static Eina_Bool > +_eina_value_type_stringshare_pget(const Eina_Value_Type *type EINA_UNUSED, > const void *mem, void *ptr) > +{ > + const Eina_Stringshare * const *src = mem; > + Eina_Stringshare **dst = ptr; > + > + *dst = eina_stringshare_ref(*src); > + return EINA_TRUE; > +} > + > +static Eina_Bool > _eina_value_type_string_flush(const Eina_Value_Type *type EINA_UNUSED, void > *mem) > { > char **tmem = mem; > @@ -5197,7 +5207,7 @@ static const Eina_Value_Type _EINA_VALUE_TYPE_BASICS[] > = { > NULL, /* no convert from */ > _eina_value_type_stringshare_vset, > _eina_value_type_stringshare_pset, > - _eina_value_type_string_common_pget > + _eina_value_type_stringshare_pget > }, > { > EINA_VALUE_TYPE_VERSION, > > -- > >
-- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel