mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue