summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorGeoffrey Irving <irving@naml.us>2011-12-04 23:21:04 -0800
committerCharles Harris <charlesr.harris@gmail.com>2011-12-21 13:13:55 -0700
commit166d0819dc86fb68380b66ffa91c966fa77cbc26 (patch)
tree036b493c076eef939656010706147d57c73c8488 /numpy
parent31eccabfd84dd1058afa0ce8908e00dfd74cfa71 (diff)
downloadnumpy-166d0819dc86fb68380b66ffa91c966fa77cbc26.tar.gz
REV: Revert check for NULL pointer in NpyCapsule_Check
Essentially all functions in the Python C API require nonnull arguments, and crash if given nulls. PyCapsule_Check is no exception, and numpy should probably mirror the standard behavior. As of change e873d58492, we don't need this check for null, so revert. Specifically, this reverts commit e9c42cab112d94dbcade9f1afc64b26af0521e14.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/include/numpy/npy_3kcompat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h
index b6d3adfcb..036ee3ac9 100644
--- a/numpy/core/include/numpy/npy_3kcompat.h
+++ b/numpy/core/include/numpy/npy_3kcompat.h
@@ -345,7 +345,7 @@ NpyCapsule_GetDesc(PyObject *obj)
static NPY_INLINE int
NpyCapsule_Check(PyObject *ptr)
{
- return ptr && PyCapsule_CheckExact(ptr);
+ return PyCapsule_CheckExact(ptr);
}
static NPY_INLINE void
@@ -384,7 +384,7 @@ NpyCapsule_GetDesc(PyObject *obj)
static NPY_INLINE int
NpyCapsule_Check(PyObject *ptr)
{
- return ptr && PyCObject_Check(ptr);
+ return PyCObject_Check(ptr);
}
static NPY_INLINE void