cxx: Instantiate objects with 2 refs

This is the original meaning of efl_add_ref().
Somehow the "ref" bool was set to true in the first call, and false in
the second call.
This commit is contained in:
Jean-Philippe Andre 2017-11-01 22:01:11 +09:00
parent 3f64dcc521
commit 03b22c4d7b
1 changed files with 2 additions and 2 deletions

View File

@ -847,7 +847,7 @@ inline void do_eo_add(Eo*& object, P const& parent
, typename std::enable_if< eo::is_eolian_object<P>::value>::type* = 0)
{
object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
object = ::_efl_add_end(object, EINA_FALSE, EINA_FALSE);
object = ::_efl_add_end(object, EINA_TRUE, EINA_FALSE);
}
template <typename T>
@ -873,7 +873,7 @@ void do_eo_add(Eo*& object, P const& parent, Efl_Class const* klass
{
object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), EINA_TRUE, EINA_FALSE);
::efl::eolian::call_lambda(std::forward<F>(f), proxy);
object = ::_efl_add_end(object, EINA_FALSE, EINA_FALSE);
object = ::_efl_add_end(object, EINA_TRUE, EINA_FALSE);
}
template <typename D, typename T>