cython/cython — pull request #78 by bfroehle (2011-12-13 18:38:08+00:00)
Title: PyArray_New: Change type to PyTypeObject*.

Cython wrongly thinks that types are represented by `PyObject*`
(and not `PyTypeObject*`) which leads to code that will not compile:

In function ‘PyObject* __pyx_pf_1f_f(PyObject*, PyObject*)’:
error: cannot convert ‘PyObject* {aka _object*}’ to
‘PyTypeObject* {aka _typeobject*}’ in argument passing

Ideally Cython should know that `__builtin__.type` corresponds to
`PyTypeObject`, but barring that this fix at least allows `PyArray_New`
to function as

class Array(np.ndarray):
pass
np.PyArray_New(Array, ...)