]> granicus.if.org Git - python/commit
bpo-36763: Add PyMemAllocatorName (GH-13387)
authorVictor Stinner <vstinner@redhat.com>
Fri, 17 May 2019 13:20:52 +0000 (15:20 +0200)
committerGitHub <noreply@github.com>
Fri, 17 May 2019 13:20:52 +0000 (15:20 +0200)
commitb16b4e45923f4e4dfd8e970ae4e6a934faf73b79
treefb7b3abc251f148386efdad7a5cde5d13d157d38
parent80ed353329ef01ca6ab2056051fb999818a86215
bpo-36763: Add PyMemAllocatorName (GH-13387)

* Add PyMemAllocatorName enum
* _PyPreConfig.allocator type becomes PyMemAllocatorName, instead of
  char*
* Remove _PyPreConfig_Clear()
* Add _PyMem_GetAllocatorName()
* Rename _PyMem_GetAllocatorsName() to
  _PyMem_GetCurrentAllocatorName()
* Remove _PyPreConfig_SetAllocator(): just call
  _PyMem_SetupAllocators() directly, we don't have do reallocate the
  configuration with the new allocator anymore!
* _PyPreConfig_Write() parameter becomes const, as it should be in
  the first place!
12 files changed:
Include/cpython/coreconfig.h
Include/cpython/pymem.h
Include/internal/pycore_coreconfig.h
Include/internal/pycore_pymem.h
Lib/test/test_embed.py
Modules/_testcapimodule.c
Objects/obmalloc.c
Programs/_testembed.c
Python/coreconfig.c
Python/preconfig.c
Python/pylifecycle.c
Python/pystate.c