diff options
Diffstat (limited to 'sources/shiboken2/libshiboken/conversions.h')
-rw-r--r-- | sources/shiboken2/libshiboken/conversions.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/conversions.h b/sources/shiboken2/libshiboken/conversions.h index f0af2be8e..a21fa0c2b 100644 --- a/sources/shiboken2/libshiboken/conversions.h +++ b/sources/shiboken2/libshiboken/conversions.h @@ -279,7 +279,7 @@ struct Converter<bool> static inline bool isConvertible(PyObject* pyobj) { return PyInt_Check(pyobj); } static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<bool*>(cppobj)); } static inline PyObject* toPython(bool cppobj) { return PyBool_FromLong(cppobj); } - static inline bool toCpp(PyObject* pyobj) { return PyInt_AS_LONG(pyobj); } + static inline bool toCpp(PyObject* pyobj) { return PyInt_AS_LONG(pyobj) != 0; } }; /** |