diff options
author | penguin_wwy <940375606@qq.com> | 2022-03-21 20:33:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-21 20:33:02 (GMT) |
commit | 1ea055bd53ccf976e88018983a3c13447c4502be (patch) | |
tree | b2c6e4d3b1f9db90c7b45eb6b69c8c6d20bda606 /Include | |
parent | 5c3201e146b251017cd77202015f47912ddcb980 (diff) | |
download | cpython-1ea055bd53ccf976e88018983a3c13447c4502be.zip cpython-1ea055bd53ccf976e88018983a3c13447c4502be.tar.gz cpython-1ea055bd53ccf976e88018983a3c13447c4502be.tar.bz2 |
bpo-47067: Optimize calling GenericAlias objects (GH-31996)
Use vectorcall, and replace `PyObject_SetAttrString` with `PyObject_SetAttr` and a global string.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_global_strings.h | 1 | ||||
-rw-r--r-- | Include/internal/pycore_runtime_init.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h index 35bffa7..1d83bf2 100644 --- a/Include/internal/pycore_global_strings.h +++ b/Include/internal/pycore_global_strings.h @@ -156,6 +156,7 @@ struct _Py_global_strings { STRUCT_FOR_ID(__next__) STRUCT_FOR_ID(__note__) STRUCT_FOR_ID(__or__) + STRUCT_FOR_ID(__orig_class__) STRUCT_FOR_ID(__origin__) STRUCT_FOR_ID(__package__) STRUCT_FOR_ID(__parameters__) diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h index 20d543a..d5690d8 100644 --- a/Include/internal/pycore_runtime_init.h +++ b/Include/internal/pycore_runtime_init.h @@ -779,6 +779,7 @@ extern "C" { INIT_ID(__next__), \ INIT_ID(__note__), \ INIT_ID(__or__), \ + INIT_ID(__orig_class__), \ INIT_ID(__origin__), \ INIT_ID(__package__), \ INIT_ID(__parameters__), \ |