mirror of
https://github.com/python/cpython.git
synced 2025-07-13 06:15:17 +00:00
- Rename PyType_InitDict() to PyType_Ready().
- Add an explicit call to PyType_Ready(&PyList_Type) to pythonrun.c (just for the heck of it, really -- we should either explicitly ready all types, or none).
This commit is contained in:
parent
c5943b1c8c
commit
528b7eb0b0
5 changed files with 16 additions and 13 deletions
|
@ -115,9 +115,12 @@ Py_Initialize(void)
|
|||
Py_FatalError("Py_Initialize: can't make first thread");
|
||||
(void) PyThreadState_Swap(tstate);
|
||||
|
||||
if (PyType_InitDict(&PyType_Type) < 0)
|
||||
if (PyType_Ready(&PyType_Type) < 0)
|
||||
Py_FatalError("Py_Initialize: can't initialize 'type'");
|
||||
|
||||
if (PyType_Ready(&PyList_Type) < 0)
|
||||
Py_FatalError("Py_Initialize: can't initialize 'list'");
|
||||
|
||||
interp->modules = PyDict_New();
|
||||
if (interp->modules == NULL)
|
||||
Py_FatalError("Py_Initialize: can't make modules dictionary");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue