mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-32096: Remove obj and mem from _PyRuntime (#4532)
bpo-32096, bpo-30860: Partially revert the commit
2ebc5ce42a:
* 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>
This commit is contained in:
parent
4864a619dc
commit
9e87e7776f
12 changed files with 684 additions and 688 deletions
|
|
@ -60,8 +60,6 @@ main(int argc, char **argv)
|
|||
filename = argv[1];
|
||||
graminit_h = argv[2];
|
||||
graminit_c = argv[3];
|
||||
_PyObject_Initialize(&_PyRuntime.obj);
|
||||
_PyMem_Initialize(&_PyRuntime.mem);
|
||||
g = getgrammar(filename);
|
||||
fp = fopen(graminit_c, "w");
|
||||
if (fp == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue