mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
merge 3.2 (#14658)
This commit is contained in:
commit
42f58818d6
3 changed files with 18 additions and 3 deletions
|
@ -3035,7 +3035,7 @@ object_str(PyObject *self)
|
|||
unaryfunc f;
|
||||
|
||||
f = Py_TYPE(self)->tp_repr;
|
||||
if (f == NULL || f == object_str)
|
||||
if (f == NULL)
|
||||
f = object_repr;
|
||||
return f(self);
|
||||
}
|
||||
|
@ -5879,7 +5879,8 @@ update_one_slot(PyTypeObject *type, slotdef *p)
|
|||
}
|
||||
continue;
|
||||
}
|
||||
if (Py_TYPE(descr) == &PyWrapperDescr_Type) {
|
||||
if (Py_TYPE(descr) == &PyWrapperDescr_Type &&
|
||||
((PyWrapperDescrObject *)descr)->d_base->name_strobj == p->name_strobj) {
|
||||
void **tptr = resolve_slotdups(type, p->name_strobj);
|
||||
if (tptr == NULL || tptr == ptr)
|
||||
generic = p->function;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue