summaryrefslogtreecommitdiffstats
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-07 22:07:29 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-07 22:07:29 (GMT)
commitbd303c165bc914fc943026ece55f4ebd225614c9 (patch)
tree030e6e557eff5ec98fef23e359498824f21afe4a /Python/_warnings.c
parent07e9e380f93e334f8f11d3ff9f42bf7c68b27d3a (diff)
downloadcpython-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/_warnings.c')
-rw-r--r--Python/_warnings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index de60128..6013d7d 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -13,6 +13,8 @@ static PyObject *_filters; /* List */
static PyObject *_once_registry; /* Dict */
static PyObject *_default_action; /* String */
+_Py_IDENTIFIER(argv);
+_Py_IDENTIFIER(stderr);
static int
check_matched(PyObject *obj, PyObject *arg)
@@ -265,7 +267,7 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject
if (name == NULL) /* XXX Can an object lack a '__name__' attribute? */
goto error;
- f_stderr = _PySys_GetObjectId(&_PyId_stderr);
+ f_stderr = _PySys_GetObjectId(&PyId_stderr);
if (f_stderr == NULL) {
fprintf(stderr, "lost sys.stderr\n");
goto error;
@@ -562,7 +564,7 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
else {
*filename = NULL;
if (*module != Py_None && PyUnicode_CompareWithASCIIString(*module, "__main__") == 0) {
- PyObject *argv = _PySys_GetObjectId(&_PyId_argv);
+ PyObject *argv = _PySys_GetObjectId(&PyId_argv);
/* PyList_Check() is needed because sys.argv is set to None during
Python finalization */
if (argv != NULL && PyList_Check(argv) && PyList_Size(argv) > 0) {