diff Modules/arraymodule.c @ 39536:8f5b9982beba

Completely get rid of PyClass and PyInstance. (classobject.[ch] aren't empty yet because they also define PyMethod.) This breaks lots of stuff, notably cPickle. But it's a step in the right direction. I'll clean it up later. (Also a few unrelated changes, e.g. T_NONE to define a "struct member" that is always None, and simplification of __hash__ -- these are unfinished.)
author Guido van Rossum <guido@python.org>
date Thu, 17 Aug 2006 05:42:55 +0000
parents 654c380cf8b9
children 3674f20ac781
line wrap: on
line diff
--- a/Modules/arraymodule.c	Thu Aug 17 05:40:03 2006 +0000
+++ b/Modules/arraymodule.c	Thu Aug 17 05:42:55 2006 +0000
@@ -2112,7 +2112,8 @@
 {
 	PyObject *m;
 
-	Arraytype.ob_type = &PyType_Type;
+	if (PyType_Ready(&Arraytype) < 0)
+            return;
 	PyArrayIter_Type.ob_type = &PyType_Type;
 	m = Py_InitModule3("array", a_methods, module_doc);
 	if (m == NULL)