eolian-cxx: Fix inheritance from C++ classes after Eo ABI breakage
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Wed, 30 Sep 2015 22:55:16 +0000 (17:55 -0500)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Wed, 30 Sep 2015 22:55:16 +0000 (17:55 -0500)
Fixed removal of op field from Eo_Op_Description and removed
unnecessary use of internal Eo API to implement the Eo API function
for theh constructor of the inherited class.

src/bindings/eo_cxx/eo_inherit_bindings.hh
src/lib/eolian_cxx/grammar/inheritance_base_generator.hh

index 9d8ca6d..cbd2bc8 100644 (file)
@@ -61,29 +61,7 @@ void inherit_constructor_impl(Eo*, Inherit_Private_Data* self, void* this_)
 /// @param this_ The <em>user data</em> to be passed to the resolved function.
 /// @param args An heterogeneous sequence of arguments.
 ///
-EAPI inline
-void inherit_constructor(void* this_)
-{
-   typedef void (*func_t)(Eo *, void *, void*);
-   Eo_Op_Call_Data ___call;
-   static Eo_Op op = EO_NOOP;
-   if ( op == EO_NOOP )
-     op = _eo_api_op_id_get
-       (reinterpret_cast<void*>
-        (&detail::inherit_constructor),
-        ::eina_main_loop_is(), __FILE__, __LINE__);
-   if (!_eo_call_resolve("detail::inherit_constructor", op, &___call,
-                         ::eina_main_loop_is(), __FILE__, __LINE__))
-     {
-        assert(_eo_call_resolve("detail::inherit_constructor", op, &___call,
-                                ::eina_main_loop_is(), __FILE__, __LINE__));
-        return;
-     }
-   func_t func = (func_t) ___call.func;
-   EO_HOOK_CALL_PREPARE(eo_hook_call_pre, "");
-   func(___call.obj, ___call.data, this_);
-   EO_HOOK_CALL_PREPARE(eo_hook_call_post, "");
-}
+inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_);
 
 template <typename T>
 int initialize_operation_description(detail::tag<void>, void*);
@@ -136,12 +114,10 @@ Eo_Class const* create_class(eina::index_sequence<S...>)
      (
       &detail::inherit_constructor
      );
-   op_descs[detail::operation_description_size<E...>::value].op = EO_NOOP;
    op_descs[detail::operation_description_size<E...>::value].op_type = EO_OP_TYPE_REGULAR;
 
    op_descs[detail::operation_description_size<E...>::value+1].func = 0;
    op_descs[detail::operation_description_size<E...>::value+1].api_func = 0;
-   op_descs[detail::operation_description_size<E...>::value+1].op = 0;
    op_descs[detail::operation_description_size<E...>::value+1].op_type = EO_OP_TYPE_INVALID;
 
    typedef inherit<D, E...> inherit_type;
index 536c9e3..561ce8c 100644 (file)
@@ -47,7 +47,6 @@ operator<<(std::ostream& out, inheritance_operation const& x)
        << x._cls.name << "_" << func.name << "_wrapper<T>);" << endl
        << tab(1) << "ops[i].api_func = reinterpret_cast<void*>(& ::"
        << func.impl << ");" << endl
-       << tab(1) << "ops[i].op = EO_OP_OVERRIDE;" << endl
        << tab(1) << "ops[i].op_type = EO_OP_TYPE_REGULAR;" << endl // XXX class ops
        << tab(1) << "++i;" << endl
        << scope_guard_tail(x._cls, func)