bpo-36763: Rework _PyInitError API (GH-13031)
* Remove _PyInitError.user_err field and _Py_INIT_USER_ERR() macro: use _Py_INIT_ERR() instead. _Py_ExitInitError() now longer calls abort() on error: exit with exit code 1 instead. * Add _PyInitError._type private field. * exitcode field type is now unsigned int on Windows. * Rename prefix field to _func. * Rename msg field to err_msg.
This commit is contained in:
@@ -578,8 +578,8 @@ _Py_HashRandomization_Init(const _PyCoreConfig *config)
|
||||
pyurandom() is non-blocking mode (blocking=0): see the PEP 524. */
|
||||
res = pyurandom(secret, secret_size, 0, 0);
|
||||
if (res < 0) {
|
||||
return _Py_INIT_USER_ERR("failed to get random numbers "
|
||||
"to initialize Python");
|
||||
return _Py_INIT_ERR("failed to get random numbers "
|
||||
"to initialize Python");
|
||||
}
|
||||
}
|
||||
return _Py_INIT_OK();
|
||||
|
||||
Reference in New Issue
Block a user