diff Python/pythonrun.c @ 26889:12753e7b15f7 legacy-trunk

SF #561244, Micro optimizations Initialize the small integers and __builtins__ in startup. This removes some if conditions. Change XDECREF to DECREF for values which shouldn't be NULL.
author Neal Norwitz <nnorwitz@gmail.com>
date Mon, 30 Dec 2002 22:29:22 +0000
parents 54aacb87beda
children dbfc3ef7d003
line wrap: on
line diff
--- a/Python/pythonrun.c	Mon Dec 30 22:23:40 2002 +0000
+++ b/Python/pythonrun.c	Mon Dec 30 22:29:22 2002 +0000
@@ -124,6 +124,12 @@
 
 	_Py_ReadyTypes();
 
+	if (!PyFrame_Init())
+		Py_FatalError("Py_Initialize: can't init frames");
+
+	if (!PyInt_Init())
+		Py_FatalError("Py_Initialize: can't init ints");
+
 	interp->modules = PyDict_New();
 	if (interp->modules == NULL)
 		Py_FatalError("Py_Initialize: can't make modules dictionary");