From 89face5db11657c0f867d0d33fe069b9529911c5 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 15 Mar 2011 20:59:04 +0000 Subject: [PATCH] Fix overloading when using const char[] and char[ANY] and const char[ANY] git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12541 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 4 ++++ Lib/typemaps/strings.swg | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 5db81a1a9..346ab8c02 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.3 (in progress) =========================== +2011-03-15: wsfulton + [UTL] Fix overloading when using const char[], problem reported by David Maxwell. + Similarly for char[ANY] and const char[ANY]. + 2011-03-15: wsfulton [C#] Apply patch #3212624 fixing std::map Keys property. diff --git a/Lib/typemaps/strings.swg b/Lib/typemaps/strings.swg index 0769fe221..d982a17a2 100644 --- a/Lib/typemaps/strings.swg +++ b/Lib/typemaps/strings.swg @@ -206,7 +206,7 @@ /* typecheck */ %typemap(typecheck,noblock=1,precedence=StringCode, - fragment=#SWIG_AsCharPtr) Char *, Char const*& { + fragment=#SWIG_AsCharPtr) Char *, const Char *, Char const*& { int res = SWIG_AsCharPtr($input, 0, 0); $1 = SWIG_CheckState(res); } @@ -351,7 +351,7 @@ %typemap(typecheck,noblock=1,precedence=StringCode, fragment=#SWIG_AsCharArray) Char [ANY], const Char[ANY] { - int res = SWIG_AsCharArray($input, (Char *)0, 0); + int res = SWIG_AsCharArray($input, (Char *)0, $1_dim0); $1 = SWIG_CheckState(res); }