summaryrefslogtreecommitdiff
path: root/numpy/core/src/ufuncobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-11-17 00:28:50 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-11-17 00:28:50 +0000
commit20cd8f309b54b4cab803c625abb90f5cb2cccb0b (patch)
treefea8b4cd2b25b9d0e009c7c373c7fcca11061079 /numpy/core/src/ufuncobject.c
parent8b48eb0badedb75e3b297b4f68552158d7ca938e (diff)
downloadnumpy-20cd8f309b54b4cab803c625abb90f5cb2cccb0b.tar.gz
Applied tecki's patch for ufunc's involving objects
Diffstat (limited to 'numpy/core/src/ufuncobject.c')
-rw-r--r--numpy/core/src/ufuncobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/ufuncobject.c b/numpy/core/src/ufuncobject.c
index 053e55c7b..6e0d146ba 100644
--- a/numpy/core/src/ufuncobject.c
+++ b/numpy/core/src/ufuncobject.c
@@ -1961,7 +1961,7 @@ PyUFunc_GenericFunction(PyUFuncObject *self, PyObject *args, PyObject *kwds,
for (i=0; i<self->nargs; i++) {
if (loop->cast[i]) {
if (steps[i] == 0) {
- Py_XDECREF(*((PyObject **)castbuf[i]));
+ Py_CLEAR(*((PyObject **)castbuf[i]));
}
else {
int size = loop->bufsize;
@@ -1972,7 +1972,7 @@ PyUFunc_GenericFunction(PyUFuncObject *self, PyObject *args, PyObject *kwds,
size = loop->leftover;
for (j=0; j<size; j++) {
- Py_XDECREF(*objptr);
+ Py_CLEAR(*objptr);
objptr += 1;
}
}