summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-03-11 23:28:45 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-03-11 23:28:45 (GMT)
commiteace3a726146c9bd383d981f2b5c6add96f13632 (patch)
treedaf979fa80838f77d0b3137eab1f33d3e2c11a1c /Objects
parent11f8b6872a779b6b03fc070ad64ed778c835435a (diff)
downloadcpython-eace3a726146c9bd383d981f2b5c6add96f13632.zip
cpython-eace3a726146c9bd383d981f2b5c6add96f13632.tar.gz
cpython-eace3a726146c9bd383d981f2b5c6add96f13632.tar.bz2
#14161: fix compile error under Windows.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 79b9aad..050e239 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -639,8 +639,9 @@ file_repr(PyFileObject *f)
PyObject *name = NULL;
if (PyUnicode_Check(f->f_name)) {
#ifdef Py_USING_UNICODE
+ const char *name_str;
name = PyUnicode_AsUnicodeEscapeString(f->f_name);
- const char *name_str = name ? PyString_AsString(name) : "?";
+ name_str = name ? PyString_AsString(name) : "?";
ret = PyString_FromFormat("<%s file u'%s', mode '%s' at %p>",
f->f_fp == NULL ? "closed" : "open",
name_str,