projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11f8b68
)
#14161: fix compile error under Windows.
author
Ezio Melotti
<ezio.melotti@gmail.com>
Sun, 11 Mar 2012 23:28:45 +0000
(
01:28
+0200)
committer
Ezio Melotti
<ezio.melotti@gmail.com>
Sun, 11 Mar 2012 23:28:45 +0000
(
01:28
+0200)
Objects/fileobject.c
patch
|
blob
|
history
diff --git
a/Objects/fileobject.c
b/Objects/fileobject.c
index 79b9aad4e8943c8fae326456f75a64c563875d3b..050e239c4f3440ce175151b1d349503e964a048b 100644
(file)
--- 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,