summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-07 20:11:10 (GMT)
committerGitHub <noreply@github.com>2023-06-07 20:11:10 (GMT)
commit1e128779befad65ec8208e0ef0d0688ef8a7f5d2 (patch)
tree011326d47cb73617207e1596f28cb62f27b85366 /Modules
parent4eadfb1c1a035970905b00263db8d9bd277098fc (diff)
downloadcpython-1e128779befad65ec8208e0ef0d0688ef8a7f5d2.zip
cpython-1e128779befad65ec8208e0ef0d0688ef8a7f5d2.tar.gz
cpython-1e128779befad65ec8208e0ef0d0688ef8a7f5d2.tar.bz2
[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 5394bf92aa6516feb3322d8372d1579bd9c1417b) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/mathmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index f26602d..f5679fe 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -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;
}