[Pyrex] Cannot cdef __init__?

Paul Prescod paul at prescod.net
Mon Jan 19 00:25:13 CET 2004


Andrew Bennetts wrote:

>...
> 
> After all these examples, you've shown me how to do almost everything except
> exactly what I want!  :)

You're shifting what you want. ;)

In the very first example you were doing mallocs and frees which 
indicated to me that your library does NOT create these objects for you. 
You were also hand-initializing each struct field, rather than using an 
external module to do the initialization. So now I need to know what you 
really, really want. ;) How much does the external library do 
(allocation? initialization?) and how much do you want Pyrex to do?
If the library does does it expect a pointer to a pointer that it will 
mutate or does it return a pointer? And how are the objects documented 
to be freed? (many libraries have matching allocate/deallocate pairs so 
that they can do cleanup beyond what "free" does).

  Paul Prescod






More information about the Pyrex mailing list