Fixed a couple wxString typemaps

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2003-12-24 02:35:33 +00:00
parent dd83f6184e
commit 54b29c1f98

View File

@ -49,6 +49,17 @@
delete $1; delete $1;
} }
%typemap(out) wxString& {
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
%#else
$result = PyString_FromStringAndSize($1->c_str(), $1->Len());
%#endif
}
%apply wxString& { wxString* }
%typemap(out) wxString { %typemap(out) wxString {
@ -59,25 +70,6 @@
%#endif %#endif
} }
%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& {
%#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
%#else
$result = PyString_FromStringAndSize($1->c_str(), $1->Len());
%#endif
}
%typemap(varout) wxString { %typemap(varout) wxString {
%#if wxUSE_UNICODE %#if wxUSE_UNICODE
$result = PyUnicode_FromWideChar($1.c_str(), $1.Len()); $result = PyUnicode_FromWideChar($1.c_str(), $1.Len());