mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Pass reference to func, as well as args, when pushing frame. (GH-31100)
This commit is contained in:
parent
2d080347d7
commit
da4d4ec185
5 changed files with 11 additions and 29 deletions
|
|
@ -784,6 +784,8 @@ _Py_IDENTIFIER(__builtins__);
|
|||
static void
|
||||
init_frame(InterpreterFrame *frame, PyFunctionObject *func, PyObject *locals)
|
||||
{
|
||||
/* _PyFrame_InitializeSpecials consumes reference to func */
|
||||
Py_INCREF(func);
|
||||
PyCodeObject *code = (PyCodeObject *)func->func_code;
|
||||
_PyFrame_InitializeSpecials(frame, func, locals, code->co_nlocalsplus);
|
||||
for (Py_ssize_t i = 0; i < code->co_nlocalsplus; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue