Skip to content

Commit

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

Fixes a typo in d2e2e53.
  • Loading branch information
neonene committed Jun 7, 2023
1 parent fbdee00 commit 5394bf9
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 5394bf9

Please sign in to comment.