STINNER Victor added the comment:

Amaury Forgeot d'Arc added the comment:
> I prefer the new version without PYMEM_TRACE_MALLOC :-)

Well, py_setallocators-filename.patch is more a proof-of-concept
showing how to use my Py_SetAllocators() API to pass the C trace
(filename/line number), than a real proposition. The patch is very
intrusive and huge, I also prefer py_setallocators-3.patch :-)

> Can we rename "API" and "api_id" to something more specific? maybe DOMAIN and 
> domain_id?

Something like:
{PY_ALLOC_MEM_DOMAIN, PY_ALLOC_OBJECT_DOMAIN}.
or
{PYMEM_DOMAIN, PYOBJECT_DOMAIN}
?

There are only two values, another option is to duplicate functions:
- PyMem_GetAllocators(), PyMem_SetAllocators(), PyMem_Malloc(), ..
- PyObject_GetAllocators(), PyObject_SetAllocators(), PyObject_Malloc(), ..

I prefer PyMem_SetAllocators() over PYOBJECT_DOMAIN.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3329>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to