gh-64490: Fix bugs in argument clinic varargs processing (#32092)

This commit is contained in:
colorfulappl 2022-11-25 03:56:50 +08:00 • committed by GitHub
parent 351842b46a
commit 0da728387c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 612 additions and 11 deletions

View file

@ -986,6 +986,9 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(keyfile));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(keys));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kind));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw1));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(kw2));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(lambda));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(last));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(last_node));
@ -1084,6 +1087,8 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pid));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(policy));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos1));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(pos2));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(print_file_and_line));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(priority));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(progress));

View file

@ -472,6 +472,9 @@ struct _Py_global_strings {
STRUCT_FOR_ID(keyfile)
STRUCT_FOR_ID(keys)
STRUCT_FOR_ID(kind)
STRUCT_FOR_ID(kw)
STRUCT_FOR_ID(kw1)
STRUCT_FOR_ID(kw2)
STRUCT_FOR_ID(lambda)
STRUCT_FOR_ID(last)
STRUCT_FOR_ID(last_node)
@ -570,6 +573,8 @@ struct _Py_global_strings {
STRUCT_FOR_ID(pid)
STRUCT_FOR_ID(policy)
STRUCT_FOR_ID(pos)
STRUCT_FOR_ID(pos1)
STRUCT_FOR_ID(pos2)
STRUCT_FOR_ID(print_file_and_line)
STRUCT_FOR_ID(priority)
STRUCT_FOR_ID(progress)

View file

@ -978,6 +978,9 @@ extern "C" {
INIT_ID(keyfile), \
INIT_ID(keys), \
INIT_ID(kind), \
INIT_ID(kw), \
INIT_ID(kw1), \
INIT_ID(kw2), \
INIT_ID(lambda), \
INIT_ID(last), \
INIT_ID(last_node), \
@ -1076,6 +1079,8 @@ extern "C" {
INIT_ID(pid), \
INIT_ID(policy), \
INIT_ID(pos), \
INIT_ID(pos1), \
INIT_ID(pos2), \
INIT_ID(print_file_and_line), \
INIT_ID(priority), \
INIT_ID(progress), \

View file

@ -850,6 +850,12 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(kind);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(kw);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(kw1);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(kw2);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(lambda);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(last);
@ -1046,6 +1052,10 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(pos);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(pos1);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(pos2);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(print_file_and_line);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(priority);