forked from enlightenment/efl
eina_value_stringshare: safer copy, to cope copying user-generated structs.
array, list, struct and others set() now copies the values. These values can be created by user, in this case string is just a stack object and not a real eina_stringshare. To cope with it, add the string instead of referencing it. Bit slower, but nicer behavior. SVN revision: 67886
This commit is contained in:
parent
e669719714
commit
75839f61a5
|
@ -2262,8 +2262,7 @@ _eina_value_type_stringshare_copy(const Eina_Value_Type *type __UNUSED__, const
|
|||
{
|
||||
const char * const*s = src;
|
||||
const char **d = dst;
|
||||
*d = *s;
|
||||
eina_stringshare_ref(*d);
|
||||
*d = eina_stringshare_add(*s);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue