Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 538d17a

Browse files
committed
Try to fix a problem with large values on Win64. Diagnosed by Thomas Heller
1 parent 671117a commit 538d17a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/getargs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
669669
Py_ssize_t ival;
670670
if (float_argument_error(arg))
671671
return converterr("integer<n>", arg, msgbuf, bufsize);
672-
ival = PyInt_AsSsize_t(arg);
672+
ival = PyNumber_AsSsize_t(arg);
673673
if (ival == -1 && PyErr_Occurred())
674674
return converterr("integer<n>", arg, msgbuf, bufsize);
675675
*p = ival;

0 commit comments

Comments
 (0)