Fix type update_slot() function when the macro INTERN_NAME_STRINGS is
not defined: use _PyUnicode_EQ() in this case.
assert(slotdefs_initialized);
pp = ptrs;
for (p = slotdefs; p->name; p++) {
- if (p->name_strobj == name)
+ assert(PyUnicode_CheckExact(p->name_strobj));
+ assert(PyUnicode_CheckExact(name));
+#ifdef INTERN_NAME_STRINGS
+ if (p->name_strobj == name) {
+ *pp++ = p;
+ }
+#else
+ if (p->name_strobj == name || _PyUnicode_EQ(p->name_strobj, name)) {
*pp++ = p;
+ }
+#endif
}
*pp = NULL;
for (pp = ptrs; *pp; pp++) {