From 5a3331618e9cf52122a262cd35ab2aee4642d67c Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Tue, 7 Jun 2016 23:44:13 -0300 Subject: [PATCH] eolian: remove support for value-type promises --- src/bin/eolian/eo_generator.c | 7 +------ src/lib/eina/eina_promise.h | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index cd111dd..8520b7e 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, Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); Eina_Bool has_promise = EINA_FALSE; - Eina_Bool is_pointer_promise = EINA_FALSE; const char* promise_param_name = NULL; const char* promise_value_type = NULL; Eina_Bool need_implementation = EINA_TRUE; @@ -388,9 +387,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, if(eina_iterator_next(promise_values, (void**)&subtype)) { promise_value_type = eolian_type_c_type_get(subtype); - is_pointer_promise = eolian_type_type_get(subtype) == EOLIAN_TYPE_POINTER - || eolian_type_type_get(subtype) == EOLIAN_TYPE_COMPLEX - || eolian_type_type_get(subtype) == EOLIAN_TYPE_CLASS; } eina_strbuf_append_printf(impl_full_params, ", Eina_Promise_Owner *%s%s", pname, is_empty && !dflt_value ?" EINA_UNUSED":""); @@ -573,10 +569,9 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, { eina_strbuf_append_printf(fbody, "#undef _EO_API_BEFORE_HOOK\n#undef _EO_API_AFTER_HOOK\n#undef _EO_API_CALL_HOOK\n" - "#define _EO_API_BEFORE_HOOK _EINA_PROMISE_%sBEFORE_HOOK(%s, %s%s)\n" + "#define _EO_API_BEFORE_HOOK _EINA_PROMISE_BEFORE_HOOK(%s, %s%s)\n" "#define _EO_API_AFTER_HOOK _EINA_PROMISE_AFTER_HOOK(%s)\n" "#define _EO_API_CALL_HOOK(x) _EINA_PROMISE_CALL_HOOK(EO_FUNC_CALL(%s))\n\n", - (is_pointer_promise? "POINTER_": ""), promise_value_type, !rettype ? "void" : rettype, eina_strbuf_string_get(impl_full_params), promise_param_name, diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h index c146196..63d356a 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; * @internal */ #define _EINA_PROMISE_BEFORE_HOOK(PromiseValue, Ret, ...) \ - Eina_Promise_Owner* const __eo_promise = eina_promise_value_add(sizeof(PromiseValue)); \ - typedef Ret (*_Eo_Promise_func_t_)(Eo*, void *obj_data, ##__VA_ARGS__); \ - _Eo_Promise_func_t_ const _eo_promise_func_ = (_Eo_Promise_func_t_)_func_; - -#define _EINA_PROMISE_POINTER_BEFORE_HOOK(PromiseValue, Ret, ...) \ Eina_Promise_Owner* const __eo_promise = eina_promise_add(); \ typedef Ret (*_Eo_Promise_func_t_)(Eo*, void *obj_data, ##__VA_ARGS__); \ _Eo_Promise_func_t_ const _eo_promise_func_ = (_Eo_Promise_func_t_)_func_; -- 2.7.4