diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-12-05 14:12:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-05 14:12:41 (GMT) |
commit | 33c377ed9b6cb3b9493005314c4e0cfa7517ea65 (patch) | |
tree | 57c547459a63179830eba576c4ea2959a605c117 /Python | |
parent | ae342cf7deebdcf2035f4064609b32b2102dadcf (diff) | |
download | cpython-33c377ed9b6cb3b9493005314c4e0cfa7517ea65.zip cpython-33c377ed9b6cb3b9493005314c4e0cfa7517ea65.tar.gz cpython-33c377ed9b6cb3b9493005314c4e0cfa7517ea65.tar.bz2 |
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
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 523397f..b615c79 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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. */ |