]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
initialize more global type objects (closes #16369)
authorBenjamin Peterson <benjamin@python.org>
Wed, 31 Oct 2012 03:21:10 +0000 (23:21 -0400)
committerBenjamin Peterson <benjamin@python.org>
Wed, 31 Oct 2012 03:21:10 +0000 (23:21 -0400)
Modules/symtablemodule.c
Objects/object.c
Objects/unicodeobject.c

index f6201e5bb0015d4f8bc128d2d031b3f3364a8676..02a81f11dc3d5b095dbafa2f72192609d53d2089 100644 (file)
@@ -63,6 +63,9 @@ PyInit__symtable(void)
 {
     PyObject *m;
 
+    if (PyType_Ready(&PySTEntry_Type) < 0)
+        return NULL;
+
     m = PyModule_Create(&symtablemodule);
     if (m == NULL)
         return NULL;
index 4730a66659c734e549ae84948bb4b2a30d055320..28bb9c1e46a526bdaedc76810a48134e656df353 100644 (file)
@@ -1644,6 +1644,30 @@ _Py_ReadyTypes(void)
 
     if (PyType_Ready(&PyZip_Type) < 0)
         Py_FatalError("Can't initialize zip type");
+
+    if (PyType_Ready(&PyCapsule_Type) < 0)
+        Py_FatalError("Can't initialize capsule type");
+
+    if (PyType_Ready(&PyLongRangeIter_Type) < 0)
+        Py_FatalError("Can't initialize long range iterator type");
+
+    if (PyType_Ready(&PyCell_Type) < 0)
+        Py_FatalError("Can't initialize cell type");
+
+    if (PyType_Ready(&PyInstanceMethod_Type) < 0)
+        Py_FatalError("Can't initialize instance method type");
+
+    if (PyType_Ready(&PyClassMethodDescr_Type) < 0)
+        Py_FatalError("Can't initialize class method descr type");
+
+    if (PyType_Ready(&PyMethodDescr_Type) < 0)
+        Py_FatalError("Can't initialize method descr type");
+
+    if (PyType_Ready(&PyCallIter_Type) < 0)
+        Py_FatalError("Can't initialize call iter type");
+
+    if (PyType_Ready(&PySeqIter_Type) < 0)
+        Py_FatalError("Can't initialize sequence iterator type");
 }
 
 
index 3ef9c9bbaf39df1a3af30c0a297f6cad94556bbf..35b424e33ab36276c99595efe776a5b8857023d1 100644 (file)
@@ -10079,6 +10079,12 @@ void _PyUnicode_Init(void)
         );
 
     PyType_Ready(&EncodingMapType);
+
+    if (PyType_Ready(&PyFieldNameIter_Type) < 0)
+        Py_FatalError("Can't initialize field name iterator type");
+
+    if (PyType_Ready(&PyFormatterIter_Type) < 0)
+        Py_FatalError("Can't initialize formatter iter type");
 }
 
 /* Finalize the Unicode implementation */