From 2f0bc0c46c2a5ac32bc4706da7eec16c7e69c460 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 1 May 2014 22:20:05 +0100 Subject: [PATCH] Modpython: fix calling overloaded methods with parameter CString& --- modules/modpython/modpython.i | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/modpython/modpython.i b/modules/modpython/modpython.i index b4445867..98ea6cbd 100644 --- a/modules/modpython/modpython.i +++ b/modules/modpython/modpython.i @@ -105,6 +105,11 @@ class MCString : public std::map {}; } } +%typemap(typecheck) CString&, CString* { + String* p; + $1 = SWIG_IsOK(SWIG_ConvertPtr($input, (void**)&p, SWIG_TypeQuery("String*"), 0)); +} + /*TODO %typemap(in) bool& to be able to call from python functions which get bool& */ %typemap(out) bool&, bool* {