Jim Fulton writes:

"""
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.
"""
This commit is contained in:
Guido van Rossum 1998-10-22 15:46:50 +00:00
parent cdcbd1f02b
commit 66468568df
1 changed files with 1 additions and 0 deletions

View File

@ -1858,6 +1858,7 @@ PyImport_Import(module_name)
/* Get the builtins from current globals */ /* Get the builtins from current globals */
globals = PyEval_GetGlobals(); globals = PyEval_GetGlobals();
if(globals != NULL) { if(globals != NULL) {
Py_INCREF(globals);
builtins = PyObject_GetItem(globals, builtins_str); builtins = PyObject_GetItem(globals, builtins_str);
if (builtins == NULL) if (builtins == NULL)
goto err; goto err;