diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-10-01 04:50:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 04:50:40 (GMT) |
commit | fa7ce080175f65d678a7d5756c94f82887fc9803 (patch) | |
tree | 316d00c0dbccfefea82733721e44599eb6903849 /Objects | |
parent | 63298930fb531ba2bb4f23bc3b915dbf1e17e9e1 (diff) | |
download | cpython-fa7ce080175f65d678a7d5756c94f82887fc9803.zip cpython-fa7ce080175f65d678a7d5756c94f82887fc9803.tar.gz cpython-fa7ce080175f65d678a7d5756c94f82887fc9803.tar.bz2 |
bpo-41870: Avoid the test when nargs=0 (GH-22462)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/boolobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/boolobject.c b/Objects/boolobject.c index ab7669c..b786966 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -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); } |