[Python-checkins] cpython: Fix find_module_path(): make the string ready
victor.stinner
python-checkins at python.org
Thu Oct 6 02:39:14 CEST 2011
http://hg.python.org/cpython/rev/c97ba8f80935
changeset: 72718:c97ba8f80935
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Thu Oct 06 02:39:42 2011 +0200
summary:
Fix find_module_path(): make the string ready
files:
Python/import.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -1785,6 +1785,9 @@
else
return 0;
+ if (PyUnicode_READY(path_unicode))
+ return -1;
+
len = PyUnicode_GET_LENGTH(path_unicode);
if (!PyUnicode_AsUCS4(path_unicode, buf, Py_ARRAY_LENGTH(buf), 1)) {
Py_DECREF(path_unicode);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list