summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMatthieu Dartiailh <m.dartiailh@gmail.com>2023-02-07 09:34:21 (GMT)
committerGitHub <noreply@github.com>2023-02-07 09:34:21 (GMT)
commitae62bddaf81176a7e55f95f18d55621c9c46c23d (patch)
tree0c7a661b7abd64546ebe0b8a495f3004ab30a6f0 /Objects
parentc4de6b1d52304a0a9cdfafc1dad5098993710404 (diff)
downloadcpython-ae62bddaf81176a7e55f95f18d55621c9c46c23d.zip
cpython-ae62bddaf81176a7e55f95f18d55621c9c46c23d.tar.gz
cpython-ae62bddaf81176a7e55f95f18d55621c9c46c23d.tar.bz2
gh-101072: support default and kw default in PyEval_EvalCodeEx for 3.11+ (#101127)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index baa3603..91a6b3d 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -87,8 +87,8 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr)
op->func_name = Py_NewRef(constr->fc_name);
op->func_qualname = Py_NewRef(constr->fc_qualname);
op->func_code = Py_NewRef(constr->fc_code);
- op->func_defaults = NULL;
- op->func_kwdefaults = NULL;
+ op->func_defaults = Py_XNewRef(constr->fc_defaults);
+ op->func_kwdefaults = Py_XNewRef(constr->fc_kwdefaults);
op->func_closure = Py_XNewRef(constr->fc_closure);
op->func_doc = Py_NewRef(Py_None);
op->func_dict = NULL;