]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed a couple wxString typemaps
authorRobin Dunn <robin@alldunn.com>
Wed, 24 Dec 2003 02:35:33 +0000 (02:35 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 24 Dec 2003 02:35:33 +0000 (02:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/my_typemaps.i

index c538e130ae4a486cee975da1743b80ddabe2a1d7..ff4994d928db116b1b0a3a1b6d2643ecf7226ade 100644 (file)
         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
-}
-
-
-%typemap(out) wxString* {
+%typemap(out) wxString& {
 %#if wxUSE_UNICODE
     $result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
 %#else
 }
 
 
-%typemap(out) wxString& {
+%apply wxString& { wxString* }
+
+
+
+%typemap(out) wxString {
 %#if wxUSE_UNICODE
-    $result = PyUnicode_FromWideChar($1->c_str(), $1->Len());
+    $result = PyUnicode_FromWideChar($1.c_str(), $1.Len());
 %#else
-    $result = PyString_FromStringAndSize($1->c_str(), $1->Len());
+    $result = PyString_FromStringAndSize($1.c_str(), $1.Len());
 %#endif
 }
 
-
 %typemap(varout) wxString {
 %#if wxUSE_UNICODE
     $result = PyUnicode_FromWideChar($1.c_str(), $1.Len());