]> granicus.if.org Git - python/commit
bpo-32096: Remove obj and mem from _PyRuntime (#4532)
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 24 Nov 2017 11:09:24 +0000 (12:09 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Nov 2017 11:09:24 +0000 (12:09 +0100)
commit9e87e7776f7ace66baaf7247233afdabd00c2b44
treee43699904e2de8394d7e408b231174f7a87c9b4a
parent4864a619dc1cc9092780ccf5a6327e8abf66133d
bpo-32096: Remove obj and mem from _PyRuntime (#4532)

bpo-32096, bpo-30860:  Partially revert the commit
2ebc5ce42a8a9e047e790aefbf9a94811569b2b6:

* Move structures back from Include/internal/mem.h to
  Objects/obmalloc.c
* Remove _PyObject_Initialize() and _PyMem_Initialize()
* Remove Include/internal/pymalloc.h
* Add test_capi.test_pre_initialization_api():
   Make sure that it's possible to call Py_DecodeLocale(), and then call
   Py_SetProgramName() with the decoded string, before Py_Initialize().

PyMem_RawMalloc() and Py_DecodeLocale() can be called again before
_PyRuntimeState_Init().

Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
12 files changed:
Include/internal/mem.h
Include/internal/pymalloc.h [deleted file]
Include/internal/pystate.h
Lib/test/test_capi.py
Makefile.pre.in
Misc/NEWS.d/next/Core and Builtins/2017-11-24-01-13-58.bpo-32096.CQTHXJ.rst [new file with mode: 0644]
Objects/obmalloc.c
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj.filters
Parser/pgenmain.c
Programs/_testembed.c
Python/pystate.c