aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/qtmodules
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-09-24 18:45:08 +0200
committerChristian Tismer <tismer@stackless.com>2021-09-27 10:52:43 +0200
commitf4532d9253aabd12fbb17fb94b80b0e48b08e8db (patch)
tree6af2ed354181110172cc6c57ea7a66759ba84f60 /sources/pyside6/doc/qtmodules
parent3fa8b76268937400523f3e10d9410f050de4c2af (diff)
PyPySide: Fix a hard-to-find bug triggered by tp_itemsize
In a metatype (a type inheriting from PyType_Type), it is common to set tp_itemsize to sizeof(PyMemberDef). This is not necessary, since tp_itemsize is otherwise inherited. In PyPy, tp_itemsize also has the undocumented meaning that the type must define a `__len__` field. Not doing so results in a barely understandable error message, and all types created in PySide crash, resulting in many failing tests. As a conclusion: The tp_itemsize field must stay zero in our metatypes. This bug was very hard to find. Many thanks for a hint from Ronan Lamy wo is an experienced PyPy developer. He saw the problem almost immediately. [ChangeLog][shiboken6] A hard-to-find incompatibility to PyPy in meta type creation was fixed. Many thanks to Ronan Lamy from the PyPy group. Task-number: PYSIDE-535 Change-Id: I99520b96c80d22195948d96cfb41b7b85c6815fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/doc/qtmodules')
0 files changed, 0 insertions, 0 deletions