summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-27 16:19:42 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commitb1883c7989355e95cd4c826d3c7ecdbbbd257d77 (patch)
tree6f6f17cf486a7a3ebd7887b1500124fef065ffd0 /src
parent994448edc422ddec3aec9ae2b8855b979f0ccd26 (diff)
eina: make eina_value_pget on an EINA_VALUE_TYPE_STRINGSHARE return a new reference to a stringshare.
Diffstat (limited to 'src')
-rw-r--r--src/lib/eina/eina_value.c12
1 files changed, 11 insertions, 1 deletions
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
2225} 2225}
2226 2226
2227static Eina_Bool 2227static Eina_Bool
2228_eina_value_type_stringshare_pget(const Eina_Value_Type *type EINA_UNUSED, const void *mem, void *ptr)
2229{
2230 const Eina_Stringshare * const *src = mem;
2231 Eina_Stringshare **dst = ptr;
2232
2233 *dst = eina_stringshare_ref(*src);
2234 return EINA_TRUE;
2235}
2236
2237static Eina_Bool
2228_eina_value_type_string_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem) 2238_eina_value_type_string_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem)
2229{ 2239{
2230 char **tmem = mem; 2240 char **tmem = mem;
@@ -5197,7 +5207,7 @@ static const Eina_Value_Type _EINA_VALUE_TYPE_BASICS[] = {
5197 NULL, /* no convert from */ 5207 NULL, /* no convert from */
5198 _eina_value_type_stringshare_vset, 5208 _eina_value_type_stringshare_vset,
5199 _eina_value_type_stringshare_pset, 5209 _eina_value_type_stringshare_pset,
5200 _eina_value_type_string_common_pget 5210 _eina_value_type_stringshare_pget
5201 }, 5211 },
5202 { 5212 {
5203 EINA_VALUE_TYPE_VERSION, 5213 EINA_VALUE_TYPE_VERSION,