bpo-41870: Avoid the test when nargs=0 (GH-22462)

This commit is contained in:
Dong-hee Na 2020-10-01 13:50:40 +09:00 committed by GitHub
parent 63298930fb
commit fa7ce08017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -72,9 +72,9 @@ bool_vectorcall(PyObject *type, PyObject * const*args,
assert(PyType_Check(type));
if (nargs) {
ok = PyObject_IsTrue(args[0]);
}
if (ok < 0) {
return NULL;
if (ok < 0) {
return NULL;
}
}
return PyBool_FromLong(ok);
}