Skip to content

Commit 5989095

Browse files
authored
pythongh-143012: use Py_ssize_t cast for PyBytes_FromStringAndSize (python#143013)
1 parent 5b52636 commit 5989095

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ convertenviron(void)
18151815
#ifdef MS_WINDOWS
18161816
k = PyUnicode_FromWideChar(*e, (Py_ssize_t)(p-*e));
18171817
#else
1818-
k = PyBytes_FromStringAndSize(*e, (int)(p-*e));
1818+
k = PyBytes_FromStringAndSize(*e, (Py_ssize_t)(p-*e));
18191819
#endif
18201820
if (k == NULL) {
18211821
Py_DECREF(d);

0 commit comments

Comments
 (0)