summaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index c3e3c4fa..38a90f5c 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -316,7 +316,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 pyobj == Py_True; }
+ static inline bool toCpp(PyObject* pyobj) { return PyInt_AS_LONG(pyobj); }
};
/**