Change in default behaviour wrapping C++ bool for Python.

Only a Python True or False will now work for C++ bool parameters.
This fixes overloading bool with other types.
This commit is contained in:
William S Fulton 2014-03-08 12:04:19 +00:00
commit 504c2030bb
11 changed files with 251 additions and 11 deletions

View file

@ -5,9 +5,11 @@
/* ------------------------------------------------------------
* Fragment section
* ------------------------------------------------------------ */
/* bool is dangerous in Python, change precedence */
#ifdef SWIG_PYTHON_LEGACY_BOOL
// Default prior to SWIG 3.0.0
#undef SWIG_TYPECHECK_BOOL
%define SWIG_TYPECHECK_BOOL 10000 %enddef
#endif
/* Include fundamental fragment definitions */
%include <typemaps/fragments.swg>