mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
#1316: remove redundant PyLong_Check calls when PyInt_Check was already called.
This commit is contained in:
parent
083bea49a8
commit
e1a0d11c5c
7 changed files with 24 additions and 31 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue