Patch from SF bug 570483 (Tim Northover).

In a fresh interpreter, type.mro(tuple) would segfault, because
PyType_Ready() isn't called for tuple yet.  To fix, call
PyType_Ready(type) if type->tp_dict is NULL.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0051179..7918af0 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -742,6 +742,11 @@
 	int i, n, ok;
 	PyObject *bases, *result;
 
+	if(type->tp_dict == NULL) {
+		if(PyType_Ready(type) < 0)
+			return NULL;
+	}
+
 	bases = type->tp_bases;
 	n = PyTuple_GET_SIZE(bases);
 	result = Py_BuildValue("[O]", (PyObject *)type);