From 951fba0cdfee521242130d42ef7463ce22a08370 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 6 Feb 2009 18:20:55 -0200 Subject: [PATCH] special case Py_None in __Pyx_PyObject_IsTrue() --- Cython/Compiler/PyrexTypes.py | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.26.2