[3.12] gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465) (gh-105471)

Fixes a typo in d2e2e53.
(cherry picked from commit 5394bf92aa)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-06-07 13:11:10 -07:00 committed by GitHub
parent 4eadfb1c1a
commit 1e128779be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2067,7 +2067,7 @@ math_trunc(PyObject *module, PyObject *x)
return PyFloat_Type.tp_as_number->nb_int(x);
}
if (_PyType_IsReady(Py_TYPE(x))) {
if (!_PyType_IsReady(Py_TYPE(x))) {
if (PyType_Ready(Py_TYPE(x)) < 0)
return NULL;
}