Commit 3a2acb50 authored by Benjamin Peterson's avatar Benjamin Peterson

remove PyType_Ready call; float should be initialized in interpreter startup

parent 2aa6c382
...@@ -752,11 +752,6 @@ PyObject_Format(PyObject* obj, PyObject *format_spec) ...@@ -752,11 +752,6 @@ PyObject_Format(PyObject* obj, PyObject *format_spec)
goto done; goto done;
} }
/* Make sure the type is initialized. float gets initialized late */
if (Py_TYPE(obj)->tp_dict == NULL)
if (PyType_Ready(Py_TYPE(obj)) < 0)
goto done;
/* Check for a __format__ method and call it. */ /* Check for a __format__ method and call it. */
if (PyInstance_Check(obj)) { if (PyInstance_Check(obj)) {
/* We're an instance of a classic class */ /* We're an instance of a classic class */
...@@ -826,7 +821,7 @@ done1: ...@@ -826,7 +821,7 @@ done1:
} else { } else {
/* Not an instance of a classic class, use the code /* Not an instance of a classic class, use the code
from py3k */ from py3k */
static PyObject *format_cache; static PyObject *format_cache = NULL;
/* Find the (unbound!) __format__ method (a borrowed /* Find the (unbound!) __format__ method (a borrowed
reference) */ reference) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment