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

This commit is contained in:
Neal Norwitz 2007-08-31 04:31:47 +00:00
parent 671117a43a
commit 538d17aa23
1 changed files with 1 additions and 1 deletions

View File

@ -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;