diff options
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r-- | Modules/mathmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index eddc1a3..a5e82d5 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -2096,7 +2096,7 @@ math_trunc(PyObject *module, PyObject *x) return PyFloat_Type.tp_as_number->nb_int(x); } - if (Py_TYPE(x)->tp_dict == NULL) { + if (_PyType_IsReady(Py_TYPE(x))) { if (PyType_Ready(Py_TYPE(x)) < 0) return NULL; } |