From ba933fa510d5049b19822cca268e2bfa41c8adad Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 3 Feb 2004 03:58:36 +0000 Subject: [PATCH] Added a typecheck typmap for wxString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/my_typemaps.i | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); +} + //--------------------------------------------------------------------------- -- 2.50.0