diff Python/errors.c @ 86999:01c4a0af73cf

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.
author Victor Stinner <victor.stinner@gmail.com>
date Thu, 07 Nov 2013 23:07:29 +0100
parents 77bebcf5c4cf
children
line wrap: on
line diff
--- a/Python/errors.c	Thu Nov 07 22:22:39 2013 +0100
+++ b/Python/errors.c	Thu Nov 07 23:07:29 2013 +0100
@@ -20,6 +20,9 @@
 extern "C" {
 #endif
 
+_Py_IDENTIFIER(builtins);
+_Py_IDENTIFIER(stderr);
+
 
 void
 PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
@@ -844,7 +847,7 @@
 
     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 @@
             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)