Skip to content

Commit 586047a

Browse files
[3.14] gh-143012: use Py_ssize_t cast for PyBytes_FromStringAndSize (GH-143013) (#143014)
gh-143012: use `Py_ssize_t` cast for `PyBytes_FromStringAndSize` (GH-143013) (cherry picked from commit 5989095) Co-authored-by: AZero13 <gfunni234@gmail.com>
1 parent dcbde6b commit 586047a

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
@@ -1786,7 +1786,7 @@ convertenviron(void)
17861786
#ifdef MS_WINDOWS
17871787
k = PyUnicode_FromWideChar(*e, (Py_ssize_t)(p-*e));
17881788
#else
1789-
k = PyBytes_FromStringAndSize(*e, (int)(p-*e));
1789+
k = PyBytes_FromStringAndSize(*e, (Py_ssize_t)(p-*e));
17901790
#endif
17911791
if (k == NULL) {
17921792
Py_DECREF(d);

0 commit comments

Comments
 (0)