Clear internal call error in 'L' format. Fixes #723201.

Backported to 2.4.
This commit is contained in:
Martin v. Löwis 2005-03-03 09:24:38 +00:00
parent f2a8d63e4f
commit ff232d7230
3 changed files with 16 additions and 1 deletions

View file

@ -610,6 +610,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf,
PY_LONG_LONG *p = va_arg( *p_va, PY_LONG_LONG * );
PY_LONG_LONG ival = PyLong_AsLongLong( arg );
if( ival == (PY_LONG_LONG)-1 && PyErr_Occurred() ) {
PyErr_Clear();
return converterr("long<L>", arg, msgbuf, bufsize);
} else {
*p = ival;