Message191049
| 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 |
<1371073869.6.0.0575976127124.issue3329@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年06月12日 21:51:09 | vstinner | set | recipients:
+ vstinner, barry, rhettinger, gregory.p.smith, amaury.forgeotdarc, ncoghlan, Rhamphoryncus, pitrou, kristjan.jonsson, jszakmeister, tlesher, jlaurila, neilo, pjmcnerney |
| 2013年06月12日 21:51:09 | vstinner | set | messageid: <1371073869.6.0.0575976127124.issue3329@psf.upfronthosting.co.za> |
| 2013年06月12日 21:51:09 | vstinner | link | issue3329 messages |
| 2013年06月12日 21:51:09 | vstinner | create |
|