Message345014
Updated patch is attached. It appears that the extra item is only needed if Py_TPFLAGS_TYPE_SUBCLASS set. In all other cases, it seems we don't need the extra space for the sentinel. At least, the unit tests pass with this change. It could be that some extension module depends on this extra allocated spaced.
The number of types affected by this change seem relatively small. The 'list' type is not affected because tp_itemsize is 0. I did a little test by running some unit tests, here are some type names that have a smaller amount of memory allocated for them:
_NamedIntConstant
CodecInfo
Point
TestResults
madtuple |
|
Date |
User |
Action |
Args |
2019-06-07 23:11:45 | nascheme | set | recipients:
+ nascheme |
2019-06-07 23:11:45 | nascheme | set | messageid: <1559949105.71.0.149269754607.issue37200@roundup.psfhosted.org> |
2019-06-07 23:11:45 | nascheme | link | issue37200 messages |
2019-06-07 23:11:45 | nascheme | create | |
|