forked from enlightenment/efl
eina: let's copy va_list when passing it around to be more portable.
NOTE: EINA_VALUE_TYPE_DISPATCH_RETURN macro is a bit weird, it does use external variable not passed to the macro and half of the parameter given to it are just ignored...
This commit is contained in:
parent
aaae3830f0
commit
7241f07f9c
|
@ -331,6 +331,8 @@ eina_value_vset(Eina_Value *value, va_list args)
|
||||||
{
|
{
|
||||||
const Eina_Value_Type *type;
|
const Eina_Value_Type *type;
|
||||||
void *mem;
|
void *mem;
|
||||||
|
va_list args_copy;
|
||||||
|
Eina_Bool r = EINA_FALSE;
|
||||||
|
|
||||||
EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
|
EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE);
|
||||||
|
|
||||||
|
@ -434,8 +436,11 @@ eina_value_vset(Eina_Value *value, va_list args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EINA_VALUE_TYPE_DISPATCH_RETURN(value, vset, 0,
|
va_copy(args_copy, args);
|
||||||
EINA_FALSE, mem, args);
|
if (type->vset) r = type->vset(type, mem, args_copy);
|
||||||
|
va_end(args_copy);
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Eina_Bool
|
static inline Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue