Re: [Numpy-discussion] C API refcount question

2009-07-06 Thread Charles R Harris
On Mon, Jul 6, 2009 at 7:30 AM, Dag Sverre Seljebotn < da...@student.matnat.uio.no> wrote: > I'm trying to fledge out Cython's numpy.pxd, and have a question: > > Is there documentation anywhere, or a simple-to-remember rule, on > whether the return value of a NumPy C API is incref-ed or not? > >

[Numpy-discussion] C API refcount question

2009-07-06 Thread Dag Sverre Seljebotn
I'm trying to fledge out Cython's numpy.pxd, and have a question: Is there documentation anywhere, or a simple-to-remember rule, on whether the return value of a NumPy C API is incref-ed or not? E.g. PyArray_BASE, PyArray_DESCR obviously does not incref; while I'm assuming that PyArray_New* mus