diff options
author | larryhastings <larry@hastings.org> | 2022-05-02 20:08:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-02 20:08:22 (GMT) |
commit | c96da83a8ed020c026c3f080e0b646f553524c85 (patch) | |
tree | 64d4aa1d16c54844f0cc9b026a8b01632bc72377 /Objects | |
parent | dd57fe1dd7675c53e69af33b511786127ae8d25c (diff) | |
download | cpython-c96da83a8ed020c026c3f080e0b646f553524c85.zip cpython-c96da83a8ed020c026c3f080e0b646f553524c85.tar.gz cpython-c96da83a8ed020c026c3f080e0b646f553524c85.tar.bz2 |
Fix the closure argument to PyEval_EvalCodeEx. (GH-92175)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/funcobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 1e0cfb7..32b4155 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -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; |