Skip to content

Commit

Permalink
Fix the closure argument to PyEval_EvalCodeEx. (pythonGH-92175)
Browse files Browse the repository at this point in the history
  • Loading branch information
larryhastings authored May 2, 2022
1 parent dd57fe1 commit c96da83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the ``closure`` argument to :c:func:`PyEval_EvalCodeEx`.
3 changes: 2 additions & 1 deletion Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr)
op->func_code = constr->fc_code;
op->func_defaults = NULL;
op->func_kwdefaults = NULL;
op->func_closure = NULL;
Py_XINCREF(constr->fc_closure);
op->func_closure = constr->fc_closure;
Py_INCREF(Py_None);
op->func_doc = Py_None;
op->func_dict = NULL;
Expand Down

0 comments on commit c96da83

Please sign in to comment.