From c03eaa5082140f1e01341e644136dc5dbba50efe Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sun, 14 May 2006 18:50:06 +0000 Subject: [PATCH] Fix char* %apply for directors git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9109 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/csharp/csharp.swg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SWIG/Lib/csharp/csharp.swg b/SWIG/Lib/csharp/csharp.swg index 9165d1324..203eb3de4 100644 --- a/SWIG/Lib/csharp/csharp.swg +++ b/SWIG/Lib/csharp/csharp.swg @@ -192,10 +192,10 @@ %typemap(out) double %{ $result = $1; %} /* char * - treat as String */ -%typemap(in) char * %{ $1 = $input; %} +%typemap(in) char * %{ $1 = ($1_ltype)$input; %} %typemap(out) char * %{ $result = SWIG_csharp_string_callback((const char *)$1); %} -%typemap(directorout) char * %{ $1 = $input; %} -%typemap(directorin) char * %{ $input = SWIG_csharp_string_callback($1); %} +%typemap(directorout) char * %{ $1 = ($1_ltype)$input; %} +%typemap(directorin) char * %{ $input = SWIG_csharp_string_callback((const char *)$1); %} %typemap(csdirectorin) char * "$iminput" %typemap(csdirectorout) char * "$cscall" @@ -352,7 +352,7 @@ %typemap(directorout) SWIGTYPE *, SWIGTYPE (CLASS::*) %{ $1 = ($1_ltype)$input; %} %typemap(directorin) SWIGTYPE *, SWIGTYPE (CLASS::*) -%{ $input = ($1_ltype) $1; %} +%{ $input = (void *) $1; %} %typemap(directorout) SWIGTYPE & %{ if (!$input) {