Changeset 1dfe409 for python/ext/py-source.c
- Timestamp:
- Mar 31, 2019, 11:12:40 PM (5 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 76b6dd3
- Parents:
- 08246ee (diff), f55630c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-source.c
r08246ee r1dfe409 582 582 } else if (PyLong_AsLong(size) > 0) { 583 583 // short read, return a shorter array 584 PyArrayObject *shortread = (PyArrayObject*)PyTuple_GetItem(done, 0); 584 PyObject *vec = PyTuple_GetItem(done, 0); 585 // take a copy to prevent resizing internal arrays 586 PyArrayObject *shortread = (PyArrayObject*)PyArray_FROM_OTF(vec, 587 NPY_NOTYPE, NPY_ARRAY_ENSURECOPY); 585 588 PyArray_Dims newdims; 586 589 PyObject *reshaped; … … 595 598 reshaped = PyArray_Newshape(shortread, &newdims, NPY_CORDER); 596 599 Py_DECREF(shortread); 600 Py_DECREF(vec); 597 601 return reshaped; 598 602 } else {
Note: See TracChangeset
for help on using the changeset viewer.