mirror of
https://github.com/python/cpython.git
synced 2025-11-17 17:46:45 +00:00
gh-119180: PEP 649: Add __annotate__ attributes (#119209)
This commit is contained in:
parent
73ab83b27f
commit
e9875ecb5d
13 changed files with 324 additions and 18 deletions
|
|
@ -590,6 +590,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
|
|||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__all__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__and__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__anext__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__annotate__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__annotations__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__args__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__asyncio_running_event_loop__));
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(__all__)
|
||||
STRUCT_FOR_ID(__and__)
|
||||
STRUCT_FOR_ID(__anext__)
|
||||
STRUCT_FOR_ID(__annotate__)
|
||||
STRUCT_FOR_ID(__annotations__)
|
||||
STRUCT_FOR_ID(__args__)
|
||||
STRUCT_FOR_ID(__asyncio_running_event_loop__)
|
||||
|
|
|
|||
1
Include/internal/pycore_runtime_init_generated.h
generated
1
Include/internal/pycore_runtime_init_generated.h
generated
|
|
@ -588,6 +588,7 @@ extern "C" {
|
|||
INIT_ID(__all__), \
|
||||
INIT_ID(__and__), \
|
||||
INIT_ID(__anext__), \
|
||||
INIT_ID(__annotate__), \
|
||||
INIT_ID(__annotations__), \
|
||||
INIT_ID(__args__), \
|
||||
INIT_ID(__asyncio_running_event_loop__), \
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
|
|||
string = &_Py_ID(__anext__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(__annotate__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
string = &_Py_ID(__annotations__);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
_PyUnicode_InternInPlace(interp, &string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue