[Python-checkins] python/dist/src/Python pythonrun.c,2.172,2.173
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Mon, 30 Dec 2002 14:29:24 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv12866/Python
Modified Files:
pythonrun.c
Log Message:
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.
Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.172
retrieving revision 2.173
diff -C2 -d -r2.172 -r2.173
*** pythonrun.c 30 Dec 2002 22:08:05 -0000 2.172
--- pythonrun.c 30 Dec 2002 22:29:22 -0000 2.173
***************
*** 125,128 ****
--- 125,134 ----
_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)