diff options
| author | mattip <matti.picus@gmail.com> | 2018-12-14 10:03:30 +0200 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2018-12-14 10:40:27 +0200 |
| commit | 33b72d2a3be10a21f8d8a00fe6dd04102857c688 (patch) | |
| tree | f7337f954d6476e482388d6d5fa49a4484ba7f43 /numpy/core/src/common | |
| parent | e41e97d86655e4ec859155d12243b9ba1a3a0924 (diff) | |
| download | numpy-33b72d2a3be10a21f8d8a00fe6dd04102857c688.tar.gz | |
BUG: fix from review
Diffstat (limited to 'numpy/core/src/common')
| -rw-r--r-- | numpy/core/src/common/ufunc_override.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/numpy/core/src/common/ufunc_override.c b/numpy/core/src/common/ufunc_override.c index 6a0faa8dd..e9089bc6c 100644 --- a/numpy/core/src/common/ufunc_override.c +++ b/numpy/core/src/common/ufunc_override.c @@ -100,17 +100,14 @@ PyUFuncOverride_GetOutObjects(PyObject *kwds, PyObject **out_kwd_obj, PyObject * * PySequence_Fast* functions. This is required for PyPy */ PyObject *seq; - int ret; - Py_INCREF(*out_kwd_obj); seq = PySequence_Fast(*out_kwd_obj, "Could not convert object to sequence"); if (seq == NULL) { return -1; } *out_objs = PySequence_Fast_ITEMS(seq); - ret = PySequence_Fast_GET_SIZE(seq); - Py_SETREF(*out_kwd_obj, seq); - return ret; + *out_kwd_obj = seq; + return PySequence_Fast_GET_SIZE(seq); } else { Py_INCREF(*out_kwd_obj); |
