From: Robin Dunn Date: Tue, 3 Feb 2004 03:58:36 +0000 (+0000) Subject: Added a typecheck typmap for wxString X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ba933fa510d5049b19822cca268e2bfa41c8adad Added a typecheck typmap for wxString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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); +} + //---------------------------------------------------------------------------