diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-07 22:07:29 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-07 22:07:29 (GMT) |
commit | bd303c165bc914fc943026ece55f4ebd225614c9 (patch) | |
tree | 030e6e557eff5ec98fef23e359498824f21afe4a /Python/errors.c | |
parent | 07e9e380f93e334f8f11d3ff9f42bf7c68b27d3a (diff) | |
download | cpython-bd303c165bc914fc943026ece55f4ebd225614c9.zip cpython-bd303c165bc914fc943026ece55f4ebd225614c9.tar.gz cpython-bd303c165bc914fc943026ece55f4ebd225614c9.tar.bz2 |
Issue #19512, #19515: remove shared identifiers, move identifiers where they
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/errors.c b/Python/errors.c index 93e4724..90dc729 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -20,6 +20,9 @@ extern char *strerror(int); extern "C" { #endif +_Py_IDENTIFIER(builtins); +_Py_IDENTIFIER(stderr); + void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) @@ -844,7 +847,7 @@ PyErr_WriteUnraisable(PyObject *obj) PyErr_Fetch(&t, &v, &tb); - f = _PySys_GetObjectId(&_PyId_stderr); + f = _PySys_GetObjectId(&PyId_stderr); if (f == NULL || f == Py_None) goto done; @@ -878,7 +881,7 @@ PyErr_WriteUnraisable(PyObject *obj) goto done; } else { - if (_PyUnicode_CompareWithId(moduleName, &_PyId_builtins) != 0) { + if (_PyUnicode_CompareWithId(moduleName, &PyId_builtins) != 0) { if (PyFile_WriteObject(moduleName, f, Py_PRINT_RAW) < 0) goto done; if (PyFile_WriteString(".", f) < 0) |