mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)
Also ensures that pybuilddir.txt is written early enough in the build to be picked up by later steps.
This commit is contained in:
parent
3cb9731b7e
commit
7778116c2f
6 changed files with 20 additions and 12 deletions
|
@ -390,7 +390,7 @@ getpath_readlines(PyObject *Py_UNUSED(self), PyObject *args)
|
|||
while (cb && (p1[cb] == L'\n' || p1[cb] == L'\r')) {
|
||||
--cb;
|
||||
}
|
||||
PyObject *u = PyUnicode_FromWideChar(p1, cb + 1);
|
||||
PyObject *u = PyUnicode_FromWideChar(p1, cb ? cb + 1 : 0);
|
||||
if (!u || PyList_Append(r, u) < 0) {
|
||||
Py_XDECREF(u);
|
||||
Py_CLEAR(r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue