Skip to content

Commit

Permalink
Jim Fulton writes:
Browse files Browse the repository at this point in the history
"""
I had originally not realized that PyEval_GetGlobals did not
INCREF it's return value.  The fix is to add the INCREF,
as shown below.
"""
  • Loading branch information
gvanrossum committed Oct 22, 1998
1 parent cdcbd1f commit 6646856
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,7 @@ PyImport_Import(module_name)
/* Get the builtins from current globals */
globals = PyEval_GetGlobals();
if(globals != NULL) {
Py_INCREF(globals);
builtins = PyObject_GetItem(globals, builtins_str);
if (builtins == NULL)
goto err;
Expand Down

0 comments on commit 6646856

Please sign in to comment.