Replacement for Py_Malloc?

Neil Schemenauer nas at python.ca
Wed May 16 19:54:39 EDT 2001


Tom Loredo wrote:
> 
> Hi-
> 
> I'm installing Python 2.1, and in rebuilding an old 3d-party extension
> that I used with 1.5.2, I'm getting errors because the extension
> calls Py_Malloc.  What should I do about these calls (about 10 of them)?
> Is there a "drop in" replacement for Py_Malloc?

You might want PyMem_Malloc.  Make sure to use MyMem_Free to free
the memory though.  If the memory is freed with free() you may
want to allocate it with malloc().  What is the memory used for?

  Neil




More information about the Python-list mailing list