Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 15812:a563eec46c1a legacy-trunk
stdout is sometimes a macro; use "outf" instead.
Submitted by: Mark Favas <m.favas@per.dem.csiro.au>
| author | Greg Stein <gstein@lyra.org> |
|---|---|
| date | Thu, 11 Jan 2001 09:27:34 +0000 |
| parents | 1a00d21910c8 |
| children | d41f9b0a40ca |
line wrap: on
line diff
--- a/Python/sysmodule.c Thu Jan 11 05:41:27 2001 +0000 +++ b/Python/sysmodule.c Thu Jan 11 09:27:34 2001 +0000 @@ -70,7 +70,7 @@ 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 @@ 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)
