From e6a07ee55b8e15445e7d652b59309d64b4081eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Mon, 22 Oct 2007 21:49:36 +0000 Subject: [PATCH] Fix testcases apply_signed_char and apply_strings by adding explicit casts to the appropriate . git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10022 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/guile/typemaps.i | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/guile/typemaps.i b/Lib/guile/typemaps.i index a0b82dc5f..45bb99215 100644 --- a/Lib/guile/typemaps.i +++ b/Lib/guile/typemaps.i @@ -225,9 +225,9 @@ %define SIMPLE_MAP(C_NAME, SCM_TO_C, C_TO_SCM, SCM_NAME) %typemap (in, doc="$NAME is of type <" #SCM_NAME ">") - C_NAME {$1 = SCM_TO_C($input);} + C_NAME {$1 = ($1_ltype) SCM_TO_C($input);} %typemap (varin, doc="NEW-VALUE is of type <" #SCM_NAME ">") - C_NAME {$1 = SCM_TO_C($input);} + C_NAME {$1 = ($1_ltype) SCM_TO_C($input);} %typemap (out, doc="<" #SCM_NAME ">") C_NAME {$result = C_TO_SCM($1);} %typemap (varout, doc="<" #SCM_NAME ">") @@ -250,7 +250,7 @@ /* Const primitive references. Passed by value */ %typemap(in, doc="$NAME is of type <" #SCM_NAME ">") const C_NAME & (C_NAME temp) { temp = SCM_TO_C($input); - $1 = &temp; + $1 = ($1_ltype) &temp; } %typemap(out, doc="<" #SCM_NAME ">") const C_NAME & { $result = C_TO_SCM(*$1); @@ -292,7 +292,7 @@ SIMPLE_MAP(unsigned long long, gh_scm2ulong_long, gh_ulong_long2scm, integer); $1 = ($1_ltype)SWIG_scm2str($input); must_free = 1; } - %typemap (varin, doc="NEW-VALUE is a string") char * {$1 = SWIG_scm2str($input);} + %typemap (varin, doc="NEW-VALUE is a string") char * {$1 = ($1_ltype)SWIG_scm2str($input);} %typemap (out, doc="") char * {$result = gh_str02scm((const char *)$1);} %typemap (varout, doc="") char * {$result = gh_str02scm($1);} %typemap (in, doc="$NAME is a string") char * *INPUT(char * temp, int must_free = 0) {