[Python-checkins] cpython (2.7): #14161: fix compile error under Windows.

ezio.melotti python-checkins at python.org
Mon Mar 12 00:29:02 CET 2012


http://hg.python.org/cpython/rev/86c749151660
changeset:   75528:86c749151660
branch:      2.7
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Mon Mar 12 01:28:45 2012 +0200
summary:
  #14161: fix compile error under Windows.

files:
  Objects/fileobject.c |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Objects/fileobject.c b/Objects/fileobject.c
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -639,8 +639,9 @@
     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,

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list