commit | 8852ad4208e34825f74e24945edb5bcf055d94fe | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@python.org> | Wed Apr 29 01:28:13 2020 +0200 |
committer | GitHub <noreply@github.com> | Wed Apr 29 01:28:13 2020 +0200 |
tree | 157f239ba46634301e136f4662b1646f7258357e | |
parent | 5e8c691594d68925213d36296ce7c4b3e90bcb1d [diff] [blame] |
bpo-40429: PyFrame_GetCode() now returns a strong reference (GH-19773)
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 6b3559e..533186b 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c
@@ -1237,5 +1237,6 @@ assert(frame != NULL); PyCodeObject *code = frame->f_code; assert(code != NULL); + Py_INCREF(code); return code; }