Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 72718:c97ba8f80935
Fix find_module_path(): make the string ready
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Thu, 06 Oct 2011 02:39:42 +0200 |
| parents | e5019967a60a |
| children | 5e33219492bc |
line wrap: on
line diff
--- a/Python/import.c Thu Oct 06 02:36:59 2011 +0200 +++ b/Python/import.c Thu Oct 06 02:39:42 2011 +0200 @@ -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);
