diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index ff4994d928..52a9103c30 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -85,7 +85,11 @@ $1 = *sptr; delete sptr; } - + +%typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER) wxString& { + $1 = PyString_Check($input) || PyUnicode_Check($input); +} + //---------------------------------------------------------------------------