cxx: Instantiate objects with 2 refs
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 1 Nov 2017 13:01:11 +0000 (22:01 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 7 Nov 2017 00:57:24 +0000 (09:57 +0900)
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.

src/bindings/cxx/eo_cxx/eo_cxx_interop.hh

index 17cc390..72c435e 100644 (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>