eolian: remove support for value-type promises
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Wed, 8 Jun 2016 02:44:13 +0000 (23:44 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Thu, 9 Jun 2016 22:14:18 +0000 (19:14 -0300)
src/bin/eolian/eo_generator.c
src/lib/eina/eina_promise.h

index cd111dd..8520b7e 100644 (file)
@@ -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,
index c146196..63d356a 100644 (file)
@@ -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_;