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:
parent
7f45cbd178
commit
504c2030bb
11 changed files with 251 additions and 11 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue