Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -142,14 +142,14 @@ Py_cvec_set_norm (Py_cvec * vec, PyObject *input, void * closure) · 141 unmodified lines | ||
| 142 | 142 | { |
| 143 | 143 | npy_intp length; |
| 144 | 144 | if (!PyAubio_IsValidVector(input)) { |
| 145 | − return 1; | |
| 145 | + return -1; | |
| 146 | 146 | } |
| 147 | 147 | length = PyArray_SIZE ((PyArrayObject *)input); |
| 148 | 148 | if (length != vec->length) { |
| 149 | 149 | PyErr_Format (PyExc_ValueError, |
| 150 | 150 | "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length, |
| 151 | 151 | vec->length); |
| 152 | − return 1; | |
| 152 | + return -1; | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | Py_XDECREF(vec->norm); |
| @@ -163,14 +163,14 @@ Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure) · 7 unmodified lines | ||
| 163 | 163 | { |
| 164 | 164 | npy_intp length; |
| 165 | 165 | if (!PyAubio_IsValidVector(input)) { |
| 166 | − return 1; | |
| 166 | + return -1; | |
| 167 | 167 | } |
| 168 | 168 | length = PyArray_SIZE ((PyArrayObject *)input); |
| 169 | 169 | if (length != vec->length) { |
| 170 | 170 | PyErr_Format (PyExc_ValueError, |
| 171 | 171 | "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length, |
| 172 | 172 | vec->length); |
| 173 | − return 1; | |
| 173 | + return -1; | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | Py_XDECREF(vec->phas); |