#1316: remove redundant PyLong_Check calls when PyInt_Check was already called.

This commit is contained in:
Georg Brandl 2007-10-23 19:24:22 +00:00
parent 083bea49a8
commit e1a0d11c5c
7 changed files with 24 additions and 31 deletions

View file

@ -696,9 +696,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
case 'k': { /* long sized bitfield */
unsigned long *p = va_arg(*p_va, unsigned long *);
unsigned long ival;
if (PyInt_Check(arg))
ival = PyInt_AsUnsignedLongMask(arg);
else if (PyLong_Check(arg))
if (PyLong_Check(arg))
ival = PyLong_AsUnsignedLongMask(arg);
else
return converterr("integer<k>", arg, msgbuf, bufsize);