summaryrefslogtreecommitdiff
path: root/src/lib/efl_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2018-04-23 16:20:12 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2018-05-17 16:56:11 -0300
commitf8a033fd70ac8a07c3c88ba2d32d61912f9961b5 (patch)
tree0f094d5009c796940f56295e1caa65b716abebf0 /src/lib/efl_mono
parent2b8cbfe2f4518d9e0f3a117561800234a4b71e4d (diff)
efl_mono: Add support for Eina.Error/Empty in eina.Value
Summary: eina.Value.Empty now means that we have an zeroed (empty) eina value. For optional values that are empty use eina.Value.OptionalEmpty. This was required to support the empty values passed with EINA_VALUE_EMPTY in some Ecore futures. Also, returning an eina_value by value is not supported in eolian for safety reasons, so we removed some tests that tried to use this behavior. Depends on D6171 Reviewers: felipealmeida Reviewed By: felipealmeida Subscribers: cedric, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6172
Diffstat (limited to 'src/lib/efl_mono')
-rw-r--r--src/lib/efl_mono/efl_custom_exports_mono.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/efl_mono/efl_custom_exports_mono.c b/src/lib/efl_mono/efl_custom_exports_mono.c
index ac38ac7fa9..246a7bcf71 100644
--- a/src/lib/efl_mono/efl_custom_exports_mono.c
+++ b/src/lib/efl_mono/efl_custom_exports_mono.c
@@ -27,6 +27,11 @@ EAPI void *efl_mono_native_alloc(unsigned int size)
27 return malloc(size); 27 return malloc(size);
28} 28}
29 29
30EAPI void efl_mono_native_memset(void *ptr, unsigned int fill, unsigned int count)
31{
32 memset(ptr, fill, count);
33}
34
30EAPI void efl_mono_native_free(void *ptr) 35EAPI void efl_mono_native_free(void *ptr)
31{ 36{
32 free(ptr); 37 free(ptr);
@@ -313,6 +318,9 @@ EAPI const Eina_Value_Type *type_array() {
313EAPI const Eina_Value_Type *type_list() { 318EAPI const Eina_Value_Type *type_list() {
314 return EINA_VALUE_TYPE_LIST; 319 return EINA_VALUE_TYPE_LIST;
315} 320}
321EAPI const Eina_Value_Type *type_error() {
322 return EINA_VALUE_TYPE_ERROR;
323}
316 324
317EAPI const Eina_Value_Type *type_optional() { 325EAPI const Eina_Value_Type *type_optional() {
318 return EINA_VALUE_TYPE_OPTIONAL; 326 return EINA_VALUE_TYPE_OPTIONAL;
@@ -354,6 +362,11 @@ EAPI void eina_value_flush_wrapper(Eina_Value *value)
354 362
355EAPI const Eina_Value_Type *eina_value_type_get_wrapper(const Eina_Value *value) 363EAPI const Eina_Value_Type *eina_value_type_get_wrapper(const Eina_Value *value)
356{ 364{
365 EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);
366
367 // Can't pass null value type (for Empty values) to value_type_get.
368 if (value->type == NULL)
369 return NULL;
357 return eina_value_type_get(value); 370 return eina_value_type_get(value);
358} 371}
359 372