]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
always return (owned or non-owned, depending on build) wxScopedCharBuffer from utf8_s...
[wxWidgets.git] / include / wx / string.h
index 2ebce253632e9d2ad5f7c1ee3e891800472bd5af..5b29a2546dd91bcf2c97d4de04cde10b97a5aaa7 100644 (file)
@@ -1710,8 +1710,10 @@ public:
         return FromImpl(wxStringImpl(utf8, len));
     }
 
-    const char* utf8_str() const { return wx_str(); }
-    const char* ToUTF8() const { return wx_str(); }
+    const wxScopedCharBuffer utf8_str() const
+        { return wxCharBuffer::CreateNonOwned(wx_str()); }
+    const wxScopedCharBuffer ToUTF8() const
+        { return wxCharBuffer::CreateNonOwned(wx_str()); }
 
     // this function exists in UTF-8 build only and returns the length of the
     // internal UTF-8 representation