From 45401fca51d1aadb1f7eabe6a9414ea3686e8231 Mon Sep 17 00:00:00 2001 From: Luigi Ballabio Date: Wed, 19 Feb 2003 08:28:59 +0000 Subject: [PATCH] Fixed typecheck for bools git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4348 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/guile/typemaps.i | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SWIG/Lib/guile/typemaps.i b/SWIG/Lib/guile/typemaps.i index 5ca39fb3c..bef321c00 100644 --- a/SWIG/Lib/guile/typemaps.i +++ b/SWIG/Lib/guile/typemaps.i @@ -324,12 +324,17 @@ typedef unsigned long SCM; const int &, const short &, const long &, const unsigned int &, const unsigned short &, const unsigned long &, const long long &, const unsigned long long &, - enum SWIGTYPE, - bool, const bool & + enum SWIGTYPE { $1 = SCM_NFALSEP(scm_integer_p($input)) ? 1 : 0; } +%typecheck(SWIG_TYPECHECK_BOOL) + bool, bool&, const bool& +{ + $1 = SCM_BOOLP($input) ? 1 : 0; +} + %typecheck(SWIG_TYPECHECK_DOUBLE) float, double, const float &, const double &