mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-115775: Compiler adds __static_attributes__ field to classes (#115913)
This commit is contained in:
parent
70969d53a7
commit
79be75735c
13 changed files with 136 additions and 11 deletions
|
|
@ -724,6 +724,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
|
|||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__slotnames__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__slots__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__spec__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__static_attributes__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__str__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__sub__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__subclasscheck__));
|
||||
|
|
|
|||
|
|
@ -213,6 +213,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(__slotnames__)
|
||||
STRUCT_FOR_ID(__slots__)
|
||||
STRUCT_FOR_ID(__spec__)
|
||||
STRUCT_FOR_ID(__static_attributes__)
|
||||
STRUCT_FOR_ID(__str__)
|
||||
STRUCT_FOR_ID(__sub__)
|
||||
STRUCT_FOR_ID(__subclasscheck__)
|
||||
|
|
|
|||
1
Include/internal/pycore_runtime_init_generated.h
generated
1
Include/internal/pycore_runtime_init_generated.h
generated
|
|
@ -722,6 +722,7 @@ extern "C" {
|
|||
INIT_ID(__slotnames__), \
|
||||
INIT_ID(__slots__), \
|
||||
INIT_ID(__spec__), \
|
||||
INIT_ID(__static_attributes__), \
|
||||
INIT_ID(__str__), \
|
||||
INIT_ID(__sub__), \
|
||||
INIT_ID(__subclasscheck__), \
|
||||
|
|
|
|||
|
|
@ -480,6 +480,9 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
|
|||
string = &_Py_ID(__spec__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(__static_attributes__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(__str__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue