From 12688fd6421ddbb8e3a2503f641f97fc58ace614 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 3 May 2006 23:08:15 +0000 Subject: [PATCH] fix changes in 1.3 to better support %apply, it didn't compile with python before git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9080 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/typemaps/strings.swg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SWIG/Lib/typemaps/strings.swg b/SWIG/Lib/typemaps/strings.swg index b4f2bd7e2..fafdbf0ca 100644 --- a/SWIG/Lib/typemaps/strings.swg +++ b/SWIG/Lib/typemaps/strings.swg @@ -35,7 +35,7 @@ if (!SWIG_IsOK(res)) { %argument_fail(res,"$type",$symname, $argnum); } - $1 = ($1_type)buf; + $1 = %static_cast(buf, $1_ltype); } %typemap(freearg,noblock=1,match="in") Char *, const Char * { if (alloc$argnum == SWIG_NEWOBJ) %delete_array(buf$argnum); @@ -174,7 +174,7 @@ if (alloc == SWIG_NEWOBJ) { swig_acquire_ownership_array(buf); } - $result = ($1_type)buf; + $result = %static_cast(buf, $ltype); } %typemap(directorfree,noblock=1) Char * {