_PyObject_LookupSpecial() now ensures that the type is ready.
return PyFloat_Type.tp_as_number->nb_int(x);
}
- if (!_PyType_IsReady(Py_TYPE(x))) {
- if (PyType_Ready(Py_TYPE(x)) < 0)
- return NULL;
- }
-
math_module_state *state = get_math_module_state(module);
trunc = _PyObject_LookupSpecial(x, state->str___trunc__);
if (trunc == NULL) {
{
PyObject *round, *result;
- if (!_PyType_IsReady(Py_TYPE(number))) {
- if (PyType_Ready(Py_TYPE(number)) < 0)
- return NULL;
- }
-
round = _PyObject_LookupSpecial(number, &_Py_ID(__round__));
if (round == NULL) {
if (!PyErr_Occurred())