mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
gh-112640: Add kwdefaults parameter to types.FunctionType.__new__ (#112641)
This commit is contained in:
parent
f653caa5a8
commit
2ac4cf4743
8 changed files with 76 additions and 13 deletions
|
|
@ -1015,6 +1015,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
|
|||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw1));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw2));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kwdefaults));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(lambda));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(last));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(last_exc));
|
||||
|
|
|
|||
|
|
@ -504,6 +504,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(kw)
|
||||
STRUCT_FOR_ID(kw1)
|
||||
STRUCT_FOR_ID(kw2)
|
||||
STRUCT_FOR_ID(kwdefaults)
|
||||
STRUCT_FOR_ID(lambda)
|
||||
STRUCT_FOR_ID(last)
|
||||
STRUCT_FOR_ID(last_exc)
|
||||
|
|
|
|||
1
Include/internal/pycore_runtime_init_generated.h
generated
1
Include/internal/pycore_runtime_init_generated.h
generated
|
|
@ -1013,6 +1013,7 @@ extern "C" {
|
|||
INIT_ID(kw), \
|
||||
INIT_ID(kw1), \
|
||||
INIT_ID(kw2), \
|
||||
INIT_ID(kwdefaults), \
|
||||
INIT_ID(lambda), \
|
||||
INIT_ID(last), \
|
||||
INIT_ID(last_exc), \
|
||||
|
|
|
|||
|
|
@ -1353,6 +1353,9 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
|
|||
string = &_Py_ID(kw2);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(kwdefaults);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(lambda);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue