summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-09 12:27:03 (GMT)
committerGitHub <noreply@github.com>2023-07-09 12:27:03 (GMT)
commit93d292c2b3f8e85ef562c37f59678c639b9b8fcb (patch)
tree17f1ff429d63ab4c900d2fd2a3bcf143e53e760f /Include
parentd137c2cae28b79555433079d917c3e0614bdcd61 (diff)
downloadcpython-93d292c2b3f8e85ef562c37f59678c639b9b8fcb.zip
cpython-93d292c2b3f8e85ef562c37f59678c639b9b8fcb.tar.gz
cpython-93d292c2b3f8e85ef562c37f59678c639b9b8fcb.tar.bz2
gh-106303: Use _PyObject_LookupAttr() instead of PyObject_GetAttr() (GH-106304)
It simplifies and speed up the code.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_global_objects_fini_generated.h1
-rw-r--r--Include/internal/pycore_global_strings.h1
-rw-r--r--Include/internal/pycore_runtime_init_generated.h1
-rw-r--r--Include/internal/pycore_unicodeobject_generated.h3
4 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_objects_fini_generated.h b/Include/internal/pycore_global_objects_fini_generated.h
index f85207b..6d50ffd 100644
--- a/Include/internal/pycore_global_objects_fini_generated.h
+++ b/Include/internal/pycore_global_objects_fini_generated.h
@@ -668,6 +668,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__lshift__));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__lt__));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__main__));
+ _PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__match_args__));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__matmul__));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__missing__));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__mod__));
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h
index 3c9c122..bb1fb13 100644
--- a/Include/internal/pycore_global_strings.h
+++ b/Include/internal/pycore_global_strings.h
@@ -157,6 +157,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(__lshift__)
STRUCT_FOR_ID(__lt__)
STRUCT_FOR_ID(__main__)
+ STRUCT_FOR_ID(__match_args__)
STRUCT_FOR_ID(__matmul__)
STRUCT_FOR_ID(__missing__)
STRUCT_FOR_ID(__mod__)
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index 9a28368..2d66647 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -663,6 +663,7 @@ extern "C" {
INIT_ID(__lshift__), \
INIT_ID(__lt__), \
INIT_ID(__main__), \
+ INIT_ID(__match_args__), \
INIT_ID(__matmul__), \
INIT_ID(__missing__), \
INIT_ID(__mod__), \
diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h
index 9e13a94..59f4007 100644
--- a/Include/internal/pycore_unicodeobject_generated.h
+++ b/Include/internal/pycore_unicodeobject_generated.h
@@ -315,6 +315,9 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
string = &_Py_ID(__main__);
assert(_PyUnicode_CheckConsistency(string, 1));
_PyUnicode_InternInPlace(interp, &string);
+ string = &_Py_ID(__match_args__);
+ assert(_PyUnicode_CheckConsistency(string, 1));
+ _PyUnicode_InternInPlace(interp, &string);
string = &_Py_ID(__matmul__);
assert(_PyUnicode_CheckConsistency(string, 1));
_PyUnicode_InternInPlace(interp, &string);