aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index bb3bfe802b9..588894adeac 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1782,7 +1782,7 @@ convertenviron(void)
return NULL;
}
#ifdef MS_WINDOWS
- v = PyUnicode_FromWideChar(p+1, wcslen(p+1));
+ v = PyUnicode_FromWideChar(p+1, -1);
#else
v = PyBytes_FromStringAndSize(p+1, strlen(p+1));
#endif
@@ -5052,7 +5052,7 @@ os__getfullpathname_impl(PyObject *module, path_t *path)
return PyErr_NoMemory();
}
- PyObject *str = PyUnicode_FromWideChar(abspath, wcslen(abspath));
+ PyObject *str = PyUnicode_FromWideChar(abspath, -1);
PyMem_RawFree(abspath);
if (str == NULL) {
return NULL;
@@ -5168,7 +5168,7 @@ os__findfirstfile_impl(PyObject *module, path_t *path)
}
wRealFileName = wFileData.cFileName;
- result = PyUnicode_FromWideChar(wRealFileName, wcslen(wRealFileName));
+ result = PyUnicode_FromWideChar(wRealFileName, -1);
FindClose(hFindFile);
return result;
}
@@ -5212,7 +5212,7 @@ os__getvolumepathname_impl(PyObject *module, path_t *path)
result = win32_error_object("_getvolumepathname", path->object);
goto exit;
}
- result = PyUnicode_FromWideChar(mountpath, wcslen(mountpath));
+ result = PyUnicode_FromWideChar(mountpath, -1);
if (PyBytes_Check(path->object))
Py_SETREF(result, PyUnicode_EncodeFSDefault(result));