git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24993
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-
-
-%typemap(out) wxString {
-%#if wxUSE_UNICODE
- $result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
-%#else
- $result = PyString_FromStringAndSize($1.c_str(), $1.Len());
-%#endif
-}
-
-
-%typemap(out) wxString* {
+%typemap(out) wxString& {
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
%#else
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
%#else
-%typemap(out) wxString& {
+%apply wxString& { wxString* }
+
+
+
+%typemap(out) wxString {
- $result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
+ $result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
- $result = PyString_FromStringAndSize($1->c_str(), $1->Len());
+ $result = PyString_FromStringAndSize($1.c_str(), $1.Len());
%typemap(varout) wxString {
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
%typemap(varout) wxString {
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1.c_str(), $1.Len());