summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-11-03 15:19:25 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-11-03 15:31:30 -0700
commite891a01749be7ff52a2937e1c08d90fc5f55808e (patch)
tree5b43a8520c623a0b1f25d8575f46b36e59a0a552
parent624b960155a1b02dd7dbef7df0d1a2221be93d4e (diff)
eina: add a function return a reference to a copy of Eina_Value.
-rw-r--r--src/lib/eina/eina_inline_value_util.x16
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)
995} 995}
996 996
997/** 997/**
998 * @brief Return a reference to #Eina_Value containing a copy of the passed parameter
999 * @param val The value to use
1000 * @return The #Eina_Value
1001 * @since 1.21
1002 */
1003static inline Eina_Value
1004eina_value_reference_copy(const Eina_Value *val)
1005{
1006 Eina_Value v = EINA_VALUE_EMPTY;
1007
1008 eina_value_setup(&v, eina_value_type_get(val));
1009 eina_value_copy(val, &v);
1010 return v;
1011}
1012
1013/**
998 * @brief Copy the stringshare in the passed #Eina_Value 1014 * @brief Copy the stringshare in the passed #Eina_Value
999 * @param val The value to copy 1015 * @param val The value to copy
1000 * @param str The pointer to copy the stringshare to 1016 * @param str The pointer to copy the stringshare to