[Cython] [cython-users] Recommendations for efficient typed arrays in Cython?

Sturla Molden sturla at molden.no
Fri Feb 1 17:11:44 CET 2013


On 01.02.2013 01:11, Greg Ewing wrote:

> Without the cdef, these variables would be stored wherever Python
> normally stores variables for the relevant scope, which could be
> in a module or instance dict, and the usual Python/C API machinery
> is used to access them.

> Distinguishing between Python and C types would be problematic
> anyway, since a PyObject* is both a Python type *and* a C type.

Really?

The way I see it, "object" is a Python type and "PyObject*" is a C type. 
That is, PyObject* is just a raw C pointer with respect to behavior.


Sturla


More information about the cython-devel mailing list