summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGreg Stein <gstein@lyra.org>2001-01-11 09:27:34 (GMT)
committerGreg Stein <gstein@lyra.org>2001-01-11 09:27:34 (GMT)
commitceb9b7c700978a9ec875ebaa41a439e3578aba25 (patch)
tree554f7d38a6efe75570ae992a60c58bb48d76f721 /Python
parentf68f2fec7df1224a031c3feed8a0ef6028cfcddd (diff)
downloadcpython-ceb9b7c700978a9ec875ebaa41a439e3578aba25.zip
cpython-ceb9b7c700978a9ec875ebaa41a439e3578aba25.tar.gz
cpython-ceb9b7c700978a9ec875ebaa41a439e3578aba25.tar.bz2
stdout is sometimes a macro; use "outf" instead.
Submitted by: Mark Favas <m.favas@per.dem.csiro.au>
Diffstat (limited to 'Python')
-rw-r--r--Python/sysmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 037b567..85fdc7e 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -70,7 +70,7 @@ PySys_SetObject(char *name, PyObject *v)
static PyObject *
sys_displayhook(PyObject *self, PyObject *args)
{
- PyObject *o, *stdout;
+ PyObject *o, *outf;
PyInterpreterState *interp = PyThreadState_Get()->interp;
PyObject *modules = interp->modules;
PyObject *builtins = PyDict_GetItemString(modules, "__builtin__");
@@ -90,14 +90,14 @@ sys_displayhook(PyObject *self, PyObject *args)
return NULL;
if (Py_FlushLine() != 0)
return NULL;
- stdout = PySys_GetObject("stdout");
- if (stdout == NULL) {
+ outf = PySys_GetObject("stdout");
+ if (outf == NULL) {
PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
return NULL;
}
- if (PyFile_WriteObject(o, stdout, 0) != 0)
+ if (PyFile_WriteObject(o, outf, 0) != 0)
return NULL;
- PyFile_SoftSpace(stdout, 1);
+ PyFile_SoftSpace(outf, 1);
if (Py_FlushLine() != 0)
return NULL;
if (PyObject_SetAttrString(builtins, "_", o) != 0)