From c91ed400e053dc9f11dd30c84e2bb611999dce50 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 30 Dec 2002 22:29:22 +0000 Subject: 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. --- Python/pythonrun.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7469cb8d43..81543cc86f 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -124,6 +124,12 @@ Py_Initialize(void) _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"); -- cgit v1.2.1