diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-30 22:29:22 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-30 22:29:22 (GMT) |
commit | c91ed400e053dc9f11dd30c84e2bb611999dce50 (patch) | |
tree | f190a1d4d9d3dbdb7d60afda9f7ea643e4f63b1b /Python | |
parent | 83f898c86c5ce68eaddd8f729a67ae2d7d0666ec (diff) | |
download | cpython-c91ed400e053dc9f11dd30c84e2bb611999dce50.zip cpython-c91ed400e053dc9f11dd30c84e2bb611999dce50.tar.gz cpython-c91ed400e053dc9f11dd30c84e2bb611999dce50.tar.bz2 |
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.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7469cb8..81543cc 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"); |