Skip to content

Commit 98d97d7

Browse files
[3.13] gh-143012: use Py_ssize_t cast for PyBytes_FromStringAndSize (GH-143013) (#143015)
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 4b8c9f5 commit 98d97d7

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
@@ -1698,7 +1698,7 @@ convertenviron(void)
16981698
#ifdef MS_WINDOWS
16991699
k = PyUnicode_FromWideChar(*e, (Py_ssize_t)(p-*e));
17001700
#else
1701-
k = PyBytes_FromStringAndSize(*e, (int)(p-*e));
1701+
k = PyBytes_FromStringAndSize(*e, (Py_ssize_t)(p-*e));
17021702
#endif
17031703
if (k == NULL) {
17041704
Py_DECREF(d);

0 commit comments

Comments
 (0)