summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 15:10:13 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-03-03 16:05:40 -0300
commit9cbda57bf03bfdaa5c0379023a05868b2f0986aa (patch)
treedebe60f34d6352ae562a575693289c068fc689b3 /src/bindings
parent5c7d78d1040b5bdfe6430e84c90d36ab8bf27064 (diff)
eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/eo_cxx/eo_cxx_interop.hh4
-rw-r--r--src/bindings/eo_cxx/eo_inherit.hh13
-rw-r--r--src/bindings/eo_cxx/eo_inherit_bindings.hh12
3 files changed, 12 insertions, 17 deletions
diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh
index 7cd7b3577b..b1978a87c2 100644
--- a/src/bindings/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/eo_cxx/eo_cxx_interop.hh
@@ -472,9 +472,9 @@ F* alloc_static_callback(F&& f)
472 472
473template <typename... Fs> 473template <typename... Fs>
474inline 474inline
475void call_ctors(Fs&&... fs) 475void call_ctors(Eo* _obj_eoid, Fs&&... fs)
476{ 476{
477 std::initializer_list<int const> const v {(fs(), 0)...}; 477 std::initializer_list<int const> const v {(fs(_obj_eoid), 0)...};
478 (void) v; 478 (void) v;
479} 479}
480 480
diff --git a/src/bindings/eo_cxx/eo_inherit.hh b/src/bindings/eo_cxx/eo_inherit.hh
index 3138d1e9a9..9639e33e4a 100644
--- a/src/bindings/eo_cxx/eo_inherit.hh
+++ b/src/bindings/eo_cxx/eo_inherit.hh
@@ -22,8 +22,15 @@ namespace detail {
22template <typename D, typename... E, std::size_t... S> 22template <typename D, typename... E, std::size_t... S>
23Eo_Class const* create_class(eina::index_sequence<S...>); 23Eo_Class const* create_class(eina::index_sequence<S...>);
24 24
25inline 25/// @internal
26void inherit_constructor(void* this_); 26///
27/// @brief Find the correct function for the <em>"constructor"</em>
28/// operation and invoke it.
29///
30/// @param this_ The <em>user data</em> to be passed to the resolved function.
31/// @param args An heterogeneous sequence of arguments.
32///
33inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_);
27 34
28} 35}
29 36
@@ -78,7 +85,7 @@ struct inherit
78 inherit(efl::eo::parent_type _p, Args&& ... args) 85 inherit(efl::eo::parent_type _p, Args&& ... args)
79 { 86 {
80 _eo_cls = detail::create_class<D, E...> (eina::make_index_sequence<sizeof...(E)>()); 87 _eo_cls = detail::create_class<D, E...> (eina::make_index_sequence<sizeof...(E)>());
81 _eo_raw = eo_add_ref(_eo_cls, _p._eo_raw, detail::inherit_constructor(this), ::efl::eolian::call_ctors(args...)); 88 _eo_raw = eo_add_ref(_eo_cls, _p._eo_raw, detail::inherit_constructor(eoid, this), ::efl::eolian::call_ctors(eoid, args...));
82 ::efl::eolian::register_ev_del_free_callback(_eo_raw, args...); 89 ::efl::eolian::register_ev_del_free_callback(_eo_raw, args...);
83 } 90 }
84 91
diff --git a/src/bindings/eo_cxx/eo_inherit_bindings.hh b/src/bindings/eo_cxx/eo_inherit_bindings.hh
index 458036d099..bb29b9e67a 100644
--- a/src/bindings/eo_cxx/eo_inherit_bindings.hh
+++ b/src/bindings/eo_cxx/eo_inherit_bindings.hh
@@ -53,18 +53,6 @@ void inherit_constructor_impl(Eo*, Inherit_Private_Data* self, void* this_)
53 self->this_ = this_; 53 self->this_ = this_;
54} 54}
55 55
56/// @internal
57///
58/// @brief Find the correct function for the <em>"constructor"</em>
59/// operation and invoke it.
60///
61/// @param this_ The <em>user data</em> to be passed to the resolved function.
62/// @param args An heterogeneous sequence of arguments.
63///
64// inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_);
65inline
66void inherit_constructor(void* this_);
67
68template <typename T> 56template <typename T>
69int initialize_operation_description(detail::tag<void>, void*); 57int initialize_operation_description(detail::tag<void>, void*);
70 58