eo: Replace ptr(Eina.Strbuf) with plain strbuf.
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Mon, 28 Jan 2019 07:10:43 +0000 (16:10 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Thu, 31 Jan 2019 02:05:21 +0000 (11:05 +0900)
Summary: Also fix CXX compilation after this change.

Reviewers: cedric, felipealmeida

Reviewed By: felipealmeida

Subscribers: #reviewers, #committers

Tags: #efl

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

src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
src/lib/eo/efl_object.eo

index 019a417..c0ed323 100644 (file)
@@ -34,6 +34,10 @@ template <>
 struct in_traits<eina::stringshare> { typedef eina::stringshare type; };
 template <>
 struct in_traits<eina::stringshare const> { typedef eina::stringshare const type; };
+template <>
+struct in_traits<efl::eina::strbuf> { typedef efl::eina::strbuf type; };
+template <>
+struct in_traits<efl::eina::strbuf const> { typedef efl::eina::strbuf const type; };
 template <typename T>
 struct in_traits<T&> { typedef T& type; };
 template <typename T>
@@ -531,6 +535,10 @@ inline const char* convert_to_c_impl(efl::eina::stringshare x, tag<const char*,
 {
    return eina_stringshare_ref(x.c_str());
 }
+inline Eina_Strbuf* convert_to_c_impl(efl::eina::strbuf& x, tag<Eina_Strbuf*, efl::eina::strbuf, false>)
+{
+   return x.native_handle();
+}
 template <typename T, typename U, typename Deleter>
 T* convert_to_c_impl(std::unique_ptr<U, Deleter>& v, tag<T*, std::unique_ptr<U, Deleter>>)
 {
index 657e492..5aa1c84 100644 (file)
@@ -107,7 +107,7 @@ abstract Efl.Object
             @since 1.21
          ]]
          params {
-            @in sb: ptr(Eina.Strbuf); [[A string buffer, must not be $null.]]
+            @in sb: strbuf; [[A string buffer, must not be $null.]]
          }
       }
       @property event_global_freeze_count @class {