mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
c4e671eec2
commit
db71975431
8 changed files with 57 additions and 45 deletions
|
@ -114,10 +114,10 @@ extern "C" {
|
|||
|
||||
#define DECODE_LOCALE_ERR(NAME, LEN) \
|
||||
((LEN) == (size_t)-2) \
|
||||
? _Py_INIT_USER_ERR("cannot decode " NAME) \
|
||||
? _Py_INIT_ERR("cannot decode " NAME) \
|
||||
: _Py_INIT_NO_MEMORY()
|
||||
|
||||
#define PATHLEN_ERR() _Py_INIT_USER_ERR("path configuration: path too long")
|
||||
#define PATHLEN_ERR() _Py_INIT_ERR("path configuration: path too long")
|
||||
|
||||
typedef struct {
|
||||
wchar_t *path_env; /* PATH environment variable */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue