mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
initialize map/filter/zip in _PyBuiltin_Init rather than the catch-all function
This commit is contained in:
parent
7ff2094bc7
commit
42124a727d
2 changed files with 6 additions and 9 deletions
|
@ -1708,15 +1708,6 @@ _Py_ReadyTypes(void)
|
||||||
if (PyType_Ready(&PyMemberDescr_Type) < 0)
|
if (PyType_Ready(&PyMemberDescr_Type) < 0)
|
||||||
Py_FatalError("Can't initialize member descriptor type");
|
Py_FatalError("Can't initialize member descriptor type");
|
||||||
|
|
||||||
if (PyType_Ready(&PyFilter_Type) < 0)
|
|
||||||
Py_FatalError("Can't initialize filter type");
|
|
||||||
|
|
||||||
if (PyType_Ready(&PyMap_Type) < 0)
|
|
||||||
Py_FatalError("Can't initialize map type");
|
|
||||||
|
|
||||||
if (PyType_Ready(&PyZip_Type) < 0)
|
|
||||||
Py_FatalError("Can't initialize zip type");
|
|
||||||
|
|
||||||
if (PyType_Ready(&_PyNamespace_Type) < 0)
|
if (PyType_Ready(&_PyNamespace_Type) < 0)
|
||||||
Py_FatalError("Can't initialize namespace type");
|
Py_FatalError("Can't initialize namespace type");
|
||||||
|
|
||||||
|
|
|
@ -2405,6 +2405,12 @@ PyObject *
|
||||||
_PyBuiltin_Init(void)
|
_PyBuiltin_Init(void)
|
||||||
{
|
{
|
||||||
PyObject *mod, *dict, *debug;
|
PyObject *mod, *dict, *debug;
|
||||||
|
|
||||||
|
if (PyType_Ready(&PyFilter_Type) < 0 ||
|
||||||
|
PyType_Ready(&PyMap_Type) < 0 ||
|
||||||
|
PyType_Ready(&PyZip_Type) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
mod = PyModule_Create(&builtinsmodule);
|
mod = PyModule_Create(&builtinsmodule);
|
||||||
if (mod == NULL)
|
if (mod == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue