From: Lisandro Dalcin Date: Fri, 6 Feb 2009 20:20:55 +0000 (-0200) Subject: special case Py_None in __Pyx_PyObject_IsTrue() X-Git-Tag: 0.11.rc~93^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=951fba0cdfee521242130d42ef7463ce22a08370;p=cython.git special case Py_None in __Pyx_PyObject_IsTrue() --- diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index 145efec4..8a024f03 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -1399,6 +1399,7 @@ static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b) { static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { if (x == Py_True) return 1; else if (x == Py_False) return 0; + else if (x == Py_None) return 0; else return PyObject_IsTrue(x); }