We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8335fa1 commit 7723cebCopy full SHA for 7723ceb
Objects/typeobject.c
@@ -82,11 +82,17 @@ static inline int
82
mcache_name_eq(PyObject *entry_name, PyObject *name)
83
{
84
#ifdef Py_GIL_DISABLED
85
+ if (entry_name == name) {
86
+ return 1;
87
+ }
88
if (entry_name == NULL || entry_name == Py_None) {
89
return 0;
90
}
91
assert(PyUnicode_CheckExact(entry_name));
92
assert(PyUnicode_CheckExact(name));
93
+ if (_PyObject_HashFast(entry_name) != _PyObject_HashFast(name)) {
94
+ return 0;
95
96
return _PyUnicode_Equal(entry_name, name);
97
#else
98
return entry_name == name;
0 commit comments