Message 191074 - Python tracker

Message191074

Author vstinner
Recipients Rhamphoryncus, amaury.forgeotdarc, barry, gregory.p.smith, jlaurila, jszakmeister, kristjan.jonsson, ncoghlan, neilo, pitrou, pjmcnerney, rhettinger, tlesher, vstinner
Date 2013-06-13.10:44:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371120273.93.0.138744572072.issue3329@psf.upfronthosting.co.za>
In-reply-to
Content
> This patch does not propose a simple API to reuse internal
> debug hooks when replacing system (PyMem) allocators.

Ok, this is now fixed with new patch (version 5). Nick does not want a new environment variable, so I added instead a new function PyMem_SetupDebugHooks() which reinstalls hooks to detect bugs if allocator functions were replaced with PyMem_SetAllocators() or PyObject_SetAllocators(). The function does nothing is Python is not compiled in debug more or if hooks are already installed (so the function can be called twice).

I also added unit tests for PyMem_SetAllocators() and PyObject_SetAllocators()! And I added "versionadded:: 3.4" to the C API documentation.
History
Date User Action Args
2013-06-13 10:44:34vstinnersetrecipients: + vstinner, barry, rhettinger, gregory.p.smith, amaury.forgeotdarc, ncoghlan, Rhamphoryncus, pitrou, kristjan.jonsson, jszakmeister, tlesher, jlaurila, neilo, pjmcnerney
2013-06-13 10:44:33vstinnersetmessageid: <1371120273.93.0.138744572072.issue3329@psf.upfronthosting.co.za>
2013-06-13 10:44:33vstinnerlinkissue3329 messages
2013-06-13 10:44:33vstinnercreate