gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465)
Fixes a typo in d2e2e53.
This commit is contained in:
parent
fbdee000de
commit
5394bf92aa
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user