Commit 1546d9c9 authored by Neal Norwitz's avatar Neal Norwitz

Try to fix a problem with large values on Win64. Diagnosed by Thomas Heller

parent eeee6a9f
......@@ -669,7 +669,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
Py_ssize_t ival;
if (float_argument_error(arg))
return converterr("integer<n>", arg, msgbuf, bufsize);
ival = PyInt_AsSsize_t(arg);
ival = PyNumber_AsSsize_t(arg);
if (ival == -1 && PyErr_Occurred())
return converterr("integer<n>", arg, msgbuf, bufsize);
*p = ival;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment