[Python-Dev] Python's C interface for types
Nick Maclaren
nmm1 at cus.cam.ac.uk
Fri Jan 26 23:41:57 CET 2007
Having looked into the answers a bit more deeply, I am afraid that
I am still a bit puzzled.
1) As I understand it, PyMem_Malloc won't cause trouble, but won't
be automatically freed, either, as it doesn't return a new reference.
I don't think that immediately following it by PyCObject_FromVoidPtr
(which is what I do) helps with that. What I need is some standard
type that allows me to allocate an anonymous block of memory; yes,
I can define such a type, but that seems excessive. Is there one?
2) _PyLong_FromByteArray and _PyLong_AsByteArray aren't in the API
and have no comments. Does that mean that they are unstable, in the
sense that they may change behaviour in new versions of Python?
And will they be there in 3.0?
Thanks for any help, again.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the Python-Dev
mailing list