Skip to content

Commit 1e12877

Browse files
[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 5394bf9) Co-authored-by: neonene <[email protected]>
1 parent 4eadfb1 commit 1e12877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/mathmodule.c

Lines changed: 1 addition & 1 deletion
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)