]> 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 60f9ba99d1a6d6765f61f14d1d499a5048d4801c..15c0f92bf416f1800b482028c07c95a05d8b4254 100644 (file)
@@ -52,6 +52,9 @@ init_symtable(void)
 {
     PyObject *m;
 
+    if (PyType_Ready(&PySTEntry_Type) < 0)
+        return;
+
     m = Py_InitModule("_symtable", symtable_methods);
     if (m == NULL)
         return;
index 9fea13a33936d207f2bfe1ac0250fdb99ace5f01..e732dceff6464890e38eb98f8c61b94a723cf73d 100644 (file)
@@ -2198,6 +2198,18 @@ _Py_ReadyTypes(void)
 
     if (PyType_Ready(&PyFile_Type) < 0)
         Py_FatalError("Can't initialize file type");
+
+    if (PyType_Ready(&PyCapsule_Type) < 0)
+        Py_FatalError("Can't initialize capsule type");
+
+    if (PyType_Ready(&PyCell_Type) < 0)
+        Py_FatalError("Can't initialize cell 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 79b87df7e7397b5478828ba7d7d4e0a53994695a..a4c04f41861bf65115470b32daa89af22ab1e363 100644 (file)
@@ -8847,6 +8847,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 */