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 &