diff options
author | Guido van Rossum <guido@python.org> | 1998-10-22 15:46:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-10-22 15:46:50 (GMT) |
commit | 66468568df6e9e56b914b15f36dc091f81117150 (patch) | |
tree | 1d0d4e7203274be6ed6131612cc497cce65cd716 /Python | |
parent | cdcbd1f02bfbf80bb8d0a93ce91a640404f0304b (diff) | |
download | cpython-66468568df6e9e56b914b15f36dc091f81117150.zip cpython-66468568df6e9e56b914b15f36dc091f81117150.tar.gz cpython-66468568df6e9e56b914b15f36dc091f81117150.tar.bz2 |
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.
"""
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index 0bf5d47..2707019 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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; |