File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2364,7 +2364,7 @@ Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.";
23642364PyObject *
23652365_PyBuiltin_Init ()
23662366{
2367- PyObject * mod , * dict ;
2367+ PyObject * mod , * dict , * debug ;
23682368 mod = Py_InitModule4 ("__builtin__" , builtin_methods ,
23692369 builtin_doc , (PyObject * )NULL ,
23702370 PYTHON_API_VERSION );
@@ -2375,9 +2375,12 @@ _PyBuiltin_Init()
23752375 return NULL ;
23762376 if (PyDict_SetItemString (dict , "Ellipsis" , Py_Ellipsis ) < 0 )
23772377 return NULL ;
2378- if (PyDict_SetItemString (dict , "__debug__" ,
2379- PyInt_FromLong (Py_OptimizeFlag == 0 )) < 0 )
2378+ debug = PyInt_FromLong (Py_OptimizeFlag == 0 );
2379+ if (PyDict_SetItemString (dict , "__debug__" , debug ) < 0 ) {
2380+ Py_XDECREF (debug );
23802381 return NULL ;
2382+ }
2383+ Py_XDECREF (debug );
23812384
23822385 return mod ;
23832386}
You can’t perform that action at this time.
0 commit comments