bpo-41870: Avoid the test when nargs=0 (GH-22462)
This commit is contained in:
parent
63298930fb
commit
fa7ce08017
|
@ -72,10 +72,10 @@ bool_vectorcall(PyObject *type, PyObject * const*args,
|
||||||
assert(PyType_Check(type));
|
assert(PyType_Check(type));
|
||||||
if (nargs) {
|
if (nargs) {
|
||||||
ok = PyObject_IsTrue(args[0]);
|
ok = PyObject_IsTrue(args[0]);
|
||||||
}
|
|
||||||
if (ok < 0) {
|
if (ok < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return PyBool_FromLong(ok);
|
return PyBool_FromLong(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue