Use PyInt_AsLong instead of PyInt_AS_LONG after the call to

PyNumber_Int, because now PyNumber_Int might return a long,
and PyInt_AsLong can handle that, whereas PyInt_AS_LONG can't.

This closes SF bug #629989.
This commit is contained in:
Walter Dörwald 2002-11-12 11:42:20 +00:00
parent 678fc1ee7d
commit 08c4cc4127

View file

@ -470,7 +470,7 @@ poll_poll(pollObject *self, PyObject *args)
tout = PyNumber_Int(tout);
if (!tout)
return NULL;
timeout = PyInt_AS_LONG(tout);
timeout = PyInt_AsLong(tout);
Py_DECREF(tout);
}