diff options
author | Travis Oliphant <oliphant@enthought.com> | 2008-07-08 17:13:53 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2008-07-08 17:13:53 +0000 |
commit | b724d59dd85b40481542bb4aa08f527ffa542b05 (patch) | |
tree | 01631fc7692c17212ca03143d53710612929c21e | |
parent | ebf8dce3a385f9da5b1e769cb1c41f8f928dfedf (diff) | |
download | numpy-b724d59dd85b40481542bb4aa08f527ffa542b05.tar.gz |
Fix refleake discussed in #848. Only applied part of the patch.
-rw-r--r-- | numpy/core/src/scalartypes.inc.src | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/src/scalartypes.inc.src b/numpy/core/src/scalartypes.inc.src index 3feefc070..680a5eca8 100644 --- a/numpy/core/src/scalartypes.inc.src +++ b/numpy/core/src/scalartypes.inc.src @@ -1883,10 +1883,11 @@ static PyObject * _WORK@work@ - if (!PyArg_ParseTuple(args, "|O", &obj)) return NULL; + if (!PyArg_ParseTuple(args, "|O", &obj)) return NULL; typecode = PyArray_DescrFromType(PyArray_@TYPE@); - Py_INCREF(typecode); + /* typecode is new reference and stolen by + PyArray_Scalar and others */ if (obj == NULL) { #if @default@ == 0 char *mem; |