diff options
author | Mark Shannon <mark@hotpy.org> | 2022-08-25 09:16:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 09:16:55 (GMT) |
commit | c09fa7542c6d9b724e423b14c6fb5f4338eabd12 (patch) | |
tree | e65689bd1bbb0d69a4cd54f3e475e79cc8d92d89 /Include | |
parent | 8db7693bbff55f5ed4bfc194c77c561e71471bf3 (diff) | |
download | cpython-c09fa7542c6d9b724e423b14c6fb5f4338eabd12.zip cpython-c09fa7542c6d9b724e423b14c6fb5f4338eabd12.tar.gz cpython-c09fa7542c6d9b724e423b14c6fb5f4338eabd12.tar.bz2 |
GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_frame.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h index 994c205..decaafd 100644 --- a/Include/internal/pycore_frame.h +++ b/Include/internal/pycore_frame.h @@ -47,7 +47,7 @@ enum _frameowner { typedef struct _PyInterpreterFrame { /* "Specials" section */ - PyFunctionObject *f_func; /* Strong reference */ + PyObject *f_funcobj; /* Strong reference */ PyObject *f_globals; /* Borrowed reference */ PyObject *f_builtins; /* Borrowed reference */ PyObject *f_locals; /* Strong reference, may be NULL */ @@ -101,7 +101,7 @@ _PyFrame_InitializeSpecials( _PyInterpreterFrame *frame, PyFunctionObject *func, PyObject *locals, PyCodeObject *code) { - frame->f_func = func; + frame->f_funcobj = (PyObject *)func; frame->f_code = (PyCodeObject *)Py_NewRef(code); frame->f_builtins = func->func_builtins; frame->f_globals = func->func_globals; |