summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-06-05 00:38:22 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-06-05 00:38:22 (GMT)
commit3a2acb5040efba7afa45d3680d0eeca45a263305 (patch)
tree4f6d0a8e1c5e641a160d379c71683063f368a447 /Objects
parent2aa6c38237535cbcfbf7ab079c960322c9a7f2c3 (diff)
downloadcpython-3a2acb5040efba7afa45d3680d0eeca45a263305.zip
cpython-3a2acb5040efba7afa45d3680d0eeca45a263305.tar.gz
cpython-3a2acb5040efba7afa45d3680d0eeca45a263305.tar.bz2
remove PyType_Ready call; float should be initialized in interpreter startup
Diffstat (limited to 'Objects')
-rw-r--r--Objects/abstract.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 898becd..20d241d 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -752,11 +752,6 @@ PyObject_Format(PyObject* obj, PyObject *format_spec)
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. */
if (PyInstance_Check(obj)) {
/* We're an instance of a classic class */
@@ -826,7 +821,7 @@ done1:
} else {
/* Not an instance of a classic class, use the code
from py3k */
- static PyObject *format_cache;
+ static PyObject *format_cache = NULL;
/* Find the (unbound!) __format__ method (a borrowed
reference) */