mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-35713: Split _Py_InitializeCore into subfunctions (GH-11650)
* Split _Py_InitializeCore_impl() into subfunctions: add multiple pycore_init_xxx() functions * Preliminary sys.stderr is now set earlier to get an usable sys.stderr ealier. * Move code into _Py_Initialize_ReconfigureCore() to be able to call it from _Py_InitializeCore(). * Split _PyExc_Init(): create a new _PyBuiltins_AddExceptions() function. * Call _PyExc_Init() earlier in _Py_InitializeCore_impl() and new_interpreter() to get working exceptions earlier. * _Py_ReadyTypes() now returns _PyInitError rather than calling Py_FatalError(). * Misc code cleanup
This commit is contained in:
parent
28f6cb34f6
commit
6d43f6f081
9 changed files with 330 additions and 338 deletions
|
@ -1999,8 +1999,9 @@ _PyFloat_Init(void)
|
|||
|
||||
/* Init float info */
|
||||
if (FloatInfoType.tp_name == NULL) {
|
||||
if (PyStructSequence_InitType2(&FloatInfoType, &floatinfo_desc) < 0)
|
||||
if (PyStructSequence_InitType2(&FloatInfoType, &floatinfo_desc) < 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue