diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2017-11-03 15:19:25 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2017-11-03 15:31:30 -0700 |
commit | e891a01749be7ff52a2937e1c08d90fc5f55808e (patch) | |
tree | 5b43a8520c623a0b1f25d8575f46b36e59a0a552 | |
parent | 624b960155a1b02dd7dbef7df0d1a2221be93d4e (diff) | |
download | efl-e891a01749be7ff52a2937e1c08d90fc5f55808e.tar.gz |
eina: add a function return a reference to a copy of Eina_Value.
-rw-r--r-- | src/lib/eina/eina_inline_value_util.x | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/eina/eina_inline_value_util.x b/src/lib/eina/eina_inline_value_util.x index 3beca713fb..010465545f 100644 --- a/src/lib/eina/eina_inline_value_util.x +++ b/src/lib/eina/eina_inline_value_util.x @@ -995,6 +995,22 @@ eina_value_dup(const Eina_Value *val) } /** + * @brief Return a reference to #Eina_Value containing a copy of the passed parameter + * @param val The value to use + * @return The #Eina_Value + * @since 1.21 + */ +static inline Eina_Value +eina_value_reference_copy(const Eina_Value *val) +{ + Eina_Value v = EINA_VALUE_EMPTY; + + eina_value_setup(&v, eina_value_type_get(val)); + eina_value_copy(val, &v); + return v; +} + +/** * @brief Copy the stringshare in the passed #Eina_Value * @param val The value to copy * @param str The pointer to copy the stringshare to |