STINNER Victor <vstin...@redhat.com> added the comment:
> May be we should add a new function (_PyMem_RawMallocItems?) that does the > same checks as PyMem_RawCalloc, but doesn't zero-initialize memory? Please don't add new functions to the Python memory allocators. We already have too many of them :-( https://docs.python.org/dev/c-api/memory.html PyZlib_Malloc, PyLzma_Malloc and BZ2_Malloc exists because they use different types: 2 unsigned int (zlib), 2 size_t (lzma), 2 int (bz2). PyMem_RawMalloc() expects a single size_t. IMHO it's fine to have a function of 5 lines of code in each module, since each module uses a different C type. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35090> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com