projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f897fa
)
special case Py_None in __Pyx_PyObject_IsTrue()
author
Lisandro Dalcin
<dalcinl@gmail.com>
Fri, 6 Feb 2009 20:20:55 +0000
(18:20 -0200)
committer
Lisandro Dalcin
<dalcinl@gmail.com>
Fri, 6 Feb 2009 20:20:55 +0000
(18:20 -0200)
Cython/Compiler/PyrexTypes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/PyrexTypes.py
b/Cython/Compiler/PyrexTypes.py
index 145efec4c972e3b777dec85aff975192b8468930..8a024f036f20cba131629e5b3ac43e939eba9b5d 100644
(file)
--- 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);
}