Skip to content

Commit

Permalink
Merge pull request #320 from zopefoundation/fix-weaklistoffset
Browse files Browse the repository at this point in the history
Fix __weaklistoffset__ in SB_members with USE_EXPLICIT_WEAKREFLIST
  • Loading branch information
davisagli committed Aug 27, 2024
2 parents c3a4945 + 81f64e3 commit ef32bf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
7.0.3 (unreleased)
==================

- Fix `Assertion 'memb->type == T_PYSSIZET' failed.` for Python < 3.12.
(`#319 <https://github.com/zopefoundation/zope.interface/issues/319>`_)


7.0.2 (2024-08-26)
==================
Expand Down
4 changes: 2 additions & 2 deletions src/zope/interface/_zope_interface_coptimizations.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static PyMemberDef SB_members[] = {
{ "__iro__", T_OBJECT_EX, offsetof(SB, __iro__), 0, "" },
{ "__sro__", T_OBJECT_EX, offsetof(SB, __sro__), 0, "" },
#if USE_EXPLICIT_WEAKREFLIST
{ "__weaklistoffset__", T_OBJECT_EX, offsetof(SB, weakreflist), 0, "" },
{ "__weaklistoffset__", T_PYSSIZET, offsetof(SB, weakreflist), READONLY, "" },
#endif
{ NULL },
};
Expand Down Expand Up @@ -649,7 +649,7 @@ static PyType_Slot CPB_type_slots[] = {
{Py_tp_clear, CPB_clear},
{Py_tp_dealloc, CPB_dealloc},
{Py_tp_members, CPB_members},
/* tp_base cannot be set as a stot -- pass to PyType_FromModuleAndSpec */
/* tp_base cannot be set as a slot -- pass to PyType_FromModuleAndSpec */
{0, NULL}
};

Expand Down

0 comments on commit ef32bf2

Please sign in to comment.