eina_cxx: Fix eina::value copy constructor.
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Tue, 16 Oct 2018 21:39:32 +0000 (18:39 -0300)
committerYeongjong Lee <yj34.lee@samsung.com>
Thu, 8 Nov 2018 06:40:45 +0000 (15:40 +0900)
Summary:
The previous declaration was causing the implicit copy constructor to be
invoked when copying a new eina::value from an existing eina::value,
thus leading to two wrappers pointing to the same underlying C pointer.

This showed some error messages when running the tests but under autotools
it didn't fail, while building with meson caused it to segfault.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7166

src/bindings/cxx/eina_cxx/eina_value.hh

index 36e6baa..5775aeb 100644 (file)
@@ -702,7 +702,7 @@ struct value : value_view
     * @brief Copy Constructor. Create an generic value storage holding the same value of @p other.
     * @param other Another <tt>eina::value</tt> object.
     */
-   value(value_view const& other)
+   value(value const& other)
      : value_view(_eina_value_traits<char>::create())
    {
      if(!eina_value_copy(other.native_handle(), _raw))