mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
bpo-32030: Simplify _PyCoreConfig_INIT macro (#4728)
* Simplify _PyCoreConfig_INIT, _PyMainInterpreterConfig_INIT, _PyPathConfig_INIT macros: no need to set fields to 0/NULL, it's redundant (the C language sets them to 0/NULL for us). * Fix typo: pymain_run_statup() => pymain_run_startup() * Remove a few XXX/TODO
This commit is contained in:
parent
ae342cf7de
commit
33c377ed9b
4 changed files with 12 additions and 51 deletions
|
@ -606,10 +606,6 @@ _Py_SetLocaleFromEnv(int category)
|
|||
* safe to call without calling Py_Initialize first)
|
||||
*/
|
||||
|
||||
/* TODO: Progressively move functionality from Py_BeginInitialization to
|
||||
* Py_ReadConfig and Py_EndInitialization
|
||||
*/
|
||||
|
||||
_PyInitError
|
||||
_Py_InitializeCore(const _PyCoreConfig *config)
|
||||
{
|
||||
|
@ -881,10 +877,9 @@ _Py_InitializeMainInterpreter(const _PyMainInterpreterConfig *config)
|
|||
return _Py_INIT_OK();
|
||||
}
|
||||
|
||||
/* TODO: Report exceptions rather than fatal errors below here */
|
||||
|
||||
if (_PyTime_Init() < 0)
|
||||
if (_PyTime_Init() < 0) {
|
||||
return _Py_INIT_ERR("can't initialize time");
|
||||
}
|
||||
|
||||
/* GetPath may initialize state that _PySys_EndInit locks
|
||||
in, and so has to be called first. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue