mirror of
https://github.com/python/cpython.git
synced 2026-04-17 01:10:46 +00:00
GH-132042: Fix calculation of slotdef index in update_one_slot() (#145880)
This commit is contained in:
parent
cd52172831
commit
f105265538
1 changed files with 1 additions and 1 deletions
|
|
@ -11737,7 +11737,7 @@ update_one_slot(PyTypeObject *type, pytype_slotdef *p, pytype_slotdef **next_p,
|
|||
if (Py_IS_TYPE(descr, &PyWrapperDescr_Type) &&
|
||||
((PyWrapperDescrObject *)descr)->d_base->name_strobj == p->name_strobj) {
|
||||
void **tptr;
|
||||
size_t index = (p - slotdefs) / sizeof(slotdefs[0]);
|
||||
size_t index = (p - slotdefs);
|
||||
if (slotdefs_name_counts[index] == 1) {
|
||||
tptr = slotptr(type, p->offset);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue