mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Fix find_module_path(): make the string ready
This commit is contained in:
parent
c729b8e92f
commit
46084bad88
1 changed files with 3 additions and 0 deletions
|
|
@ -1785,6 +1785,9 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (PyUnicode_READY(path_unicode))
|
||||||
|
return -1;
|
||||||
|
|
||||||
len = PyUnicode_GET_LENGTH(path_unicode);
|
len = PyUnicode_GET_LENGTH(path_unicode);
|
||||||
if (!PyUnicode_AsUCS4(path_unicode, buf, Py_ARRAY_LENGTH(buf), 1)) {
|
if (!PyUnicode_AsUCS4(path_unicode, buf, Py_ARRAY_LENGTH(buf), 1)) {
|
||||||
Py_DECREF(path_unicode);
|
Py_DECREF(path_unicode);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue