[Pyrex] Casting Python sequence to pointer and vice versa

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 4 23:13:21 UTC 2007


Christian Heimes wrote:
> IMO malloc & friends are a common construct and often used. I
> suggest that you either add them to the documentation or declare them as
> cdef in Pyrex's core.

I'm thinking about adding some language features that
would make explicit use of malloc less necessary, so
you wouldn't usually need declarations for them.

I might consider providing some files that you can
include for other commonly used stdio routines.

> As a Pyrex newbie I missed some good examples in the docs or example
> directory. I tried different ways like
> 
> cdef unsigned long *v
> v = pythonlist

The docs do point out that conversion is only automatic
for a very few simple types. I'll consider adding some
examples of how you might code more complex cases.

Thanks for your comments,
Greg



More information about the Pyrex mailing list