bpo-32030: Fix usage of memory allocators (#4953)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 20 Dec 2017 22:41:38 +0000 (23:41 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Dec 2017 22:41:38 +0000 (23:41 +0100)
commit31e99080f6f8cf7faaba9fe3a4e0996e49163317
tree918783a9df15a34a36405fdf7d0809102ccd90ea
parent83cb778b4a3f856f2243b0f0d36fefb5c44b388f
bpo-32030: Fix usage of memory allocators (#4953)

* _Py_InitializeCore() doesn't call _PyMem_SetupAllocators() anymore
  if the PYTHONMALLOC environment variable is not set.
* pymain_cmdline() now sets the allocator to the default, instead of
  setting the allocator in subfunctions.
* Py_SetStandardStreamEncoding() now calls
  _PyMem_SetDefaultAllocator() to get a known allocator, to be able
  to release the memory with the same allocator.
Misc/NEWS.d/next/C API/2017-12-20-23-22-32.bpo-32030.d1dcwh.rst [new file with mode: 0644]
Modules/main.c
Python/pylifecycle.c