commit | 46084bad8826e547b66496867a5ba0e21c0b4a45 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Thu Oct 06 02:39:42 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Thu Oct 06 02:39:42 2011 +0200 |
tree | eddc398c668706e7b6cf795157d07a12be365a5a | |
parent | c729b8e92f044688e1b9d1cb24541c6f3d297415 [diff] [blame] |
Fix find_module_path(): make the string ready
diff --git a/Python/import.c b/Python/import.c index 9f094c0..5f84ac2 100644 --- 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);