Author vstinner
Recipients Rhamphoryncus, amaury.forgeotdarc, barry, gregory.p.smith, jlaurila, jszakmeister, kristjan.jonsson, ncoghlan, neilo, pitrou, pjmcnerney, rhettinger, tlesher, vstinner
Date 2013-06-12.21:51:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
New version (4) of the patch:

 - move the opaque pointer (now called "void *ctx", "context") as the first parameter instead of the last parameter, as done in zlib, lzma and Oracle's OCI APIs; ctx is also the first parameter of Py*_GetFunctions() and Py*_SetFunctions() instead of the last
 - rename public functions:

   * Py_GetAllocators() -> PyMem_GetAllocators(), PyObject_GetAllocators()
   * Py_SetAllocators() -> PyMem_SetAllocators(), PyObject_SetAllocators()
   * Py_GetBlockAllocators() -> PyObject_GetArenaAllocators()
   * Py_SetBlockAllocators() -> PyObject_SetArenaAllocators()

 - move declaration of PyObject_*() functions from pymem.h to objimpl.h
 - split _PyMem big structure into smaller structures: _PyMem, _PyObject, _PyObject_Arena
 - move "if (size == 0) size = 1;" from PyMem_Malloc() to _PyMem_Malloc(), so the custom allocator can decide how to implement PyMem_Malloc(0) (maybe something more efficient)

Does the new API look better? py_setallocators-4.patch is ready for a final review. If nobody complains, I'm going to commit it.
Date User Action Args
2013-06-12 21:51:09vstinnersetrecipients: + vstinner, barry, rhettinger, gregory.p.smith, amaury.forgeotdarc, ncoghlan, Rhamphoryncus, pitrou, kristjan.jonsson, jszakmeister, tlesher, jlaurila, neilo, pjmcnerney
2013-06-12 21:51:09vstinnersetmessageid: <>
2013-06-12 21:51:09vstinnerlinkissue3329 messages
2013-06-12 21:51:09vstinnercreate