Skip to content

Commit

Permalink
[3.12] pythongh-94673: Ensure subtypes are readied only once in math.…
Browse files Browse the repository at this point in the history
…trunc() (pythongh-105465) (pythongh-105471)

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

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
  • Loading branch information
miss-islington and neonene committed Jun 7, 2023
1 parent 4eadfb1 commit 1e12877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1e12877

Please sign in to comment.