[Python-checkins] cpython: Fix regression under Windows following b75b41237380 (from issue #13392)

antoine.pitrou python-checkins at python.org
Tue Nov 15 20:47:52 CET 2011


http://hg.python.org/cpython/rev/12940d9f8031
changeset:   73574:12940d9f8031
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Nov 15 20:40:55 2011 +0100
summary:
  Fix regression under Windows following b75b41237380 (from issue #13392)

files:
  Python/import.c |  5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -1267,6 +1267,11 @@
         PyErr_Clear();
         return;
     }
+    if (PyUnicode_CopyCharacters(cpathname_tmp, 0,
+                                 cpathname, 0, cpathname_len) < 0) {
+        PyErr_Clear();
+        return;
+    }
     PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 0, '.');
     PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 1, 't');
     PyUnicode_WriteChar(cpathname_tmp, cpathname_len + 2, 'm');

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


More information about the Python-checkins mailing list