Skip to content

Commit 7a715c2

Browse files
neonenemiss-islington
authored andcommitted
pythongh-94673: Ensure subtypes are readied only once in math.trunc() (pythongh-105465)
Fixes a typo in d2e2e53. (cherry picked from commit 5394bf9) Co-authored-by: neonene <[email protected]>
1 parent 4eadfb1 commit 7a715c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/mathmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ math_trunc(PyObject *module, PyObject *x)
20672067
return PyFloat_Type.tp_as_number->nb_int(x);
20682068
}
20692069

2070-
if (_PyType_IsReady(Py_TYPE(x))) {
2070+
if (!_PyType_IsReady(Py_TYPE(x))) {
20712071
if (PyType_Ready(Py_TYPE(x)) < 0)
20722072
return NULL;
20732073
}

0 commit comments

Comments
 (0)