summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2016-06-07 23:44:13 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-09 19:14:18 -0300
commit5a3331618e9cf52122a262cd35ab2aee4642d67c (patch)
tree9a699e22bb1499cf747bafb31aad7e3e1ccbc925
parent3b090b808bf668f393d01c87dbfe5071615a7a72 (diff)
eolian: remove support for value-type promises
-rw-r--r--src/bin/eolian/eo_generator.c7
-rw-r--r--src/lib/eina/eina_promise.h5
2 files changed, 1 insertions, 11 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index cd111dd1a4..8520b7e0cc 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -303,7 +303,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
303 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); 303 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
304 304
305 Eina_Bool has_promise = EINA_FALSE; 305 Eina_Bool has_promise = EINA_FALSE;
306 Eina_Bool is_pointer_promise = EINA_FALSE;
307 const char* promise_param_name = NULL; 306 const char* promise_param_name = NULL;
308 const char* promise_value_type = NULL; 307 const char* promise_value_type = NULL;
309 Eina_Bool need_implementation = EINA_TRUE; 308 Eina_Bool need_implementation = EINA_TRUE;
@@ -388,9 +387,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
388 if(eina_iterator_next(promise_values, (void**)&subtype)) 387 if(eina_iterator_next(promise_values, (void**)&subtype))
389 { 388 {
390 promise_value_type = eolian_type_c_type_get(subtype); 389 promise_value_type = eolian_type_c_type_get(subtype);
391 is_pointer_promise = eolian_type_type_get(subtype) == EOLIAN_TYPE_POINTER
392 || eolian_type_type_get(subtype) == EOLIAN_TYPE_COMPLEX
393 || eolian_type_type_get(subtype) == EOLIAN_TYPE_CLASS;
394 } 390 }
395 eina_strbuf_append_printf(impl_full_params, ", Eina_Promise_Owner *%s%s", 391 eina_strbuf_append_printf(impl_full_params, ", Eina_Promise_Owner *%s%s",
396 pname, is_empty && !dflt_value ?" EINA_UNUSED":""); 392 pname, is_empty && !dflt_value ?" EINA_UNUSED":"");
@@ -573,10 +569,9 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
573 { 569 {
574 eina_strbuf_append_printf(fbody, 570 eina_strbuf_append_printf(fbody,
575 "#undef _EO_API_BEFORE_HOOK\n#undef _EO_API_AFTER_HOOK\n#undef _EO_API_CALL_HOOK\n" 571 "#undef _EO_API_BEFORE_HOOK\n#undef _EO_API_AFTER_HOOK\n#undef _EO_API_CALL_HOOK\n"
576 "#define _EO_API_BEFORE_HOOK _EINA_PROMISE_%sBEFORE_HOOK(%s, %s%s)\n" 572 "#define _EO_API_BEFORE_HOOK _EINA_PROMISE_BEFORE_HOOK(%s, %s%s)\n"
577 "#define _EO_API_AFTER_HOOK _EINA_PROMISE_AFTER_HOOK(%s)\n" 573 "#define _EO_API_AFTER_HOOK _EINA_PROMISE_AFTER_HOOK(%s)\n"
578 "#define _EO_API_CALL_HOOK(x) _EINA_PROMISE_CALL_HOOK(EO_FUNC_CALL(%s))\n\n", 574 "#define _EO_API_CALL_HOOK(x) _EINA_PROMISE_CALL_HOOK(EO_FUNC_CALL(%s))\n\n",
579 (is_pointer_promise? "POINTER_": ""),
580 promise_value_type, !rettype ? "void" : rettype, 575 promise_value_type, !rettype ? "void" : rettype,
581 eina_strbuf_string_get(impl_full_params), 576 eina_strbuf_string_get(impl_full_params),
582 promise_param_name, 577 promise_param_name,
diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index c14619607d..63d356aaab 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -540,11 +540,6 @@ EAPI extern Eina_Error EINA_ERROR_PROMISE_NULL;
540 * @internal 540 * @internal
541 */ 541 */
542#define _EINA_PROMISE_BEFORE_HOOK(PromiseValue, Ret, ...) \ 542#define _EINA_PROMISE_BEFORE_HOOK(PromiseValue, Ret, ...) \
543 Eina_Promise_Owner* const __eo_promise = eina_promise_value_add(sizeof(PromiseValue)); \
544 typedef Ret (*_Eo_Promise_func_t_)(Eo*, void *obj_data, ##__VA_ARGS__); \
545 _Eo_Promise_func_t_ const _eo_promise_func_ = (_Eo_Promise_func_t_)_func_;
546
547#define _EINA_PROMISE_POINTER_BEFORE_HOOK(PromiseValue, Ret, ...) \
548 Eina_Promise_Owner* const __eo_promise = eina_promise_add(); \ 543 Eina_Promise_Owner* const __eo_promise = eina_promise_add(); \
549 typedef Ret (*_Eo_Promise_func_t_)(Eo*, void *obj_data, ##__VA_ARGS__); \ 544 typedef Ret (*_Eo_Promise_func_t_)(Eo*, void *obj_data, ##__VA_ARGS__); \
550 _Eo_Promise_func_t_ const _eo_promise_func_ = (_Eo_Promise_func_t_)_func_; 545 _Eo_Promise_func_t_ const _eo_promise_func_ = (_Eo_Promise_func_t_)_func_;