mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
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.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user