mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
[3.11] gh-101072: support default and kw default in PyEval_EvalCodeEx for 3.11+ (GH-101127) (#101636)
Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Matthieu Dartiailh <m.dartiailh@gmail.com>
This commit is contained in:
parent
358b02dac4
commit
955ba2839b
5 changed files with 201 additions and 6 deletions
|
@ -27,8 +27,10 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr)
|
|||
op->func_qualname = constr->fc_qualname;
|
||||
Py_INCREF(constr->fc_code);
|
||||
op->func_code = constr->fc_code;
|
||||
op->func_defaults = NULL;
|
||||
op->func_kwdefaults = NULL;
|
||||
Py_XINCREF(constr->fc_defaults);
|
||||
op->func_defaults = constr->fc_defaults;
|
||||
Py_XINCREF(constr->fc_kwdefaults);
|
||||
op->func_kwdefaults = constr->fc_kwdefaults;
|
||||
Py_XINCREF(constr->fc_closure);
|
||||
op->func_closure = constr->fc_closure;
|
||||
Py_INCREF(Py_None);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue