Skip to content

Commit f5ef409

Browse files
committed
bug "workaround" (see bug #280 for remaining issues)
git-svn-id: https://svn.grrrr.org/ext/trunk/py@3639 4d9ac71a-51e6-0310-8455-cad1006bcd31
1 parent 9357baf commit f5ef409

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

source/pybuffer.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,8 @@ PyObject *arrayfrombuffer(PyObject *buf,int c,int n)
276276
int err = PyObject_AsWriteBuffer(buf,&data,&len);
277277
if(!err) {
278278
FLEXT_ASSERT(len <= n*c*sizeof(t_sample));
279-
Py_INCREF(buf);
280-
// \todo change to new API!
279+
// Py_INCREF(buf); // ATTENTION... this won't be released any more!!
281280
# ifdef PY_NUMPY
282-
// PyArray_NewFromDescr(&PyArray_Type, type_descr, 1, shape, strides, 0, 0, 0);
283281
arr = PyArray_NewFromDescr(&PyArray_Type,PyArray_DescrNewFromType(numtype),c == 1?1:2,shape,0,(char *)data,NPY_WRITEABLE|NPY_C_CONTIGUOUS,NULL);
284282
# else
285283
arr = PyArray_FromDimsAndData(c == 1?1:2,shape,numtype,(char *)data);

0 commit comments

Comments
 (0)