summaryrefslogtreecommitdiffstats
path: root/Objects/funcobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/funcobject.c')
-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;