mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465) (gh-105471)
Fixes a typo ind2e2e53
. (cherry picked from commit5394bf92aa
) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
This commit is contained in:
parent
4eadfb1c1a
commit
1e128779be
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