From 2c29e8ea589bb00d9d7aa940ff5ad8cd3a1c5ae8 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/SWIG@4348 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/guile/typemaps.i | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Lib/guile/typemaps.i b/Lib/guile/typemaps.i index 5ca39fb3c..bef321c00 100644 --- a/Lib/guile/typemaps.i +++ b/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 &