summaryrefslogtreecommitdiff
path: root/src/lib/efl_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-11-30 17:49:35 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2017-12-04 15:47:52 -0300
commit3c5efa1e8dfee3d619e1b4fc6f23d6ae29085000 (patch)
tree6dae8b724d6f0d0d1cf9398eb70fbe2811e8d504 /src/lib/efl_mono
parentc316a2ef372e53b0c9374b5ddca0f8c33f05d9e2 (diff)
efl_mono: Fix eina_value_set.
Instead of messing around with varargs, create individual wrappers for each type supported. The va_list approach was getting problems with float/double on Windows.
Diffstat (limited to 'src/lib/efl_mono')
-rw-r--r--src/lib/efl_mono/efl_custom_exports_mono.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/efl_mono/efl_custom_exports_mono.c b/src/lib/efl_mono/efl_custom_exports_mono.c
index 16b2977db9..ac38ac7fa9 100644
--- a/src/lib/efl_mono/efl_custom_exports_mono.c
+++ b/src/lib/efl_mono/efl_custom_exports_mono.c
@@ -323,14 +323,23 @@ EAPI size_t eina_value_sizeof()
323 return sizeof(Eina_Value); 323 return sizeof(Eina_Value);
324} 324}
325 325
326EAPI Eina_Bool eina_value_set_wrapper(Eina_Value *value, ...) 326#define EINA_SET_WRAPPER(N, T) EAPI Eina_Bool eina_value_set_wrapper_##N(Eina_Value *value, T new_value) \
327{ 327{ \
328 va_list argp; 328 return eina_value_set(value, new_value); \
329 va_start(argp, value); 329}
330 Eina_Bool ret = eina_value_vset(value, argp); 330
331 va_end(argp); 331EINA_SET_WRAPPER(char, char)
332 return ret; 332EINA_SET_WRAPPER(uchar, unsigned char)
333} 333EINA_SET_WRAPPER(short, short)
334EINA_SET_WRAPPER(ushort, unsigned short)
335EINA_SET_WRAPPER(int, int)
336EINA_SET_WRAPPER(uint, unsigned int)
337EINA_SET_WRAPPER(long, long)
338EINA_SET_WRAPPER(ulong, unsigned long)
339EINA_SET_WRAPPER(float, float)
340EINA_SET_WRAPPER(double, double)
341EINA_SET_WRAPPER(string, const char *)
342EINA_SET_WRAPPER(ptr, void *)
334 343
335EAPI Eina_Bool eina_value_setup_wrapper(Eina_Value *value, 344EAPI Eina_Bool eina_value_setup_wrapper(Eina_Value *value,
336 const Eina_Value_Type *type) 345 const Eina_Value_Type *type)