diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-30 22:29:22 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-12-30 22:29:22 +0000 |
commit | 8d823a70755d358e6db56e83ce5d76bc9e8a1bcf (patch) | |
tree | b54bfb1a55b0079ae33ba5d1b44cf5324e219ec1 /Python/pythonrun.c | |
parent | 889979208cbad4070fa3d27b816ff7783eb1e276 (diff) | |
download | cpython-8d823a70755d358e6db56e83ce5d76bc9e8a1bcf.tar.gz |
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/pythonrun.c')
-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 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"); |