This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Rhamphoryncus, amaury.forgeotdarc, barry, gregory.p.smith, jlaurila, jszakmeister, kristjan.jonsson, ncoghlan, neilo, pitrou, pjmcnerney, rhettinger, tlesher, vstinner
Date 2013-06-03.10:25:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370255102.96.0.643435881551.issue3329@psf.upfronthosting.co.za>
In-reply-to
Content
"""
I'm happy with the api you provide, with a small addition:
PyAPI_FUNC(int) Py_SetAllocators(
    char api,
    void* (*malloc) (size_t size, void *data),
    void* (*realloc) (void* ptr, size_t size, void *data),
    void (*free) (void* ptr, void *data),
    void *data
    );
"""

Oops, I forgot "void *data". Yeah, each group of allocator functions (malloc, free and realloc) will get its own "data" pointer.
History
Date User Action Args
2013-06-03 10:25:02vstinnersetrecipients: + vstinner, barry, rhettinger, gregory.p.smith, amaury.forgeotdarc, ncoghlan, Rhamphoryncus, pitrou, kristjan.jonsson, jszakmeister, tlesher, jlaurila, neilo, pjmcnerney
2013-06-03 10:25:02vstinnersetmessageid: <1370255102.96.0.643435881551.issue3329@psf.upfronthosting.co.za>
2013-06-03 10:25:02vstinnerlinkissue3329 messages
2013-06-03 10:25:02vstinnercreate