History

Revert "[py] avoid resizing py-source output"

This reverts commit 8e76c71be6136f4e2289f8c67e422097f5e10dfe. No need to copy here, the culprit should be in py-sink.c.

Paul Brossier committed 7 years ago

Commit 48105ca1 parent 776d65b1 file · +1 −3Browse files

Showing the changes to python/ext (1 of 1 file). Show all

Unified · Split

python/ext/py-source.c+1−3
@@ -573,9 +573,7 @@ static PyObject* Pyaubio_source_iter_next(Py_source *self) { · 572 unmodified lines
573 return vec;573 return vec;
574 } else if (PyLong_AsLong(size) > 0) {574 } else if (PyLong_AsLong(size) > 0) {
575 // short read, return a shorter array575 // short read, return a shorter array
576 PyArrayObject *shortread = (PyArrayObject*)576 PyArrayObject *shortread = (PyArrayObject*)PyTuple_GetItem(done, 0);
577 PyArray_FROM_OTF(PyTuple_GetItem(done, 0), NPY_NOTYPE,
578 NPY_ARRAY_ENSURECOPY);
579 PyArray_Dims newdims;577 PyArray_Dims newdims;
580 PyObject *reshaped;578 PyObject *reshaped;
581 newdims.len = PyArray_NDIM(shortread);579 newdims.len = PyArray_NDIM(shortread);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t