comparison Python/pythonrun.c @ 19040:4df72ea78ae8 legacy-trunk

- Rename PyType_InitDict() to PyType_Ready(). - Add an explicit call to PyType_Ready(&PyList_Type) to pythonrun.c (just for the heck of it, really -- we should either explicitly ready all types, or none).
author Guido van Rossum <guido@python.org>
date Tue, 07 Aug 2001 17:24:28 +0000
parents 09df3254b49d
children de5d7a9428ef
comparison
equal deleted inserted replaced
19039:f66ccf2c63eb 19040:4df72ea78ae8
113 tstate = PyThreadState_New(interp); 113 tstate = PyThreadState_New(interp);
114 if (tstate == NULL) 114 if (tstate == NULL)
115 Py_FatalError("Py_Initialize: can't make first thread"); 115 Py_FatalError("Py_Initialize: can't make first thread");
116 (void) PyThreadState_Swap(tstate); 116 (void) PyThreadState_Swap(tstate);
117 117
118 if (PyType_InitDict(&PyType_Type) < 0) 118 if (PyType_Ready(&PyType_Type) < 0)
119 Py_FatalError("Py_Initialize: can't initialize 'type'"); 119 Py_FatalError("Py_Initialize: can't initialize 'type'");
120
121 if (PyType_Ready(&PyList_Type) < 0)
122 Py_FatalError("Py_Initialize: can't initialize 'list'");
120 123
121 interp->modules = PyDict_New(); 124 interp->modules = PyDict_New();
122 if (interp->modules == NULL) 125 if (interp->modules == NULL)
123 Py_FatalError("Py_Initialize: can't make modules dictionary"); 126 Py_FatalError("Py_Initialize: can't make modules dictionary");
124 127