Message313452
The array of PyMethodDef for OrderedDict contains explicit definitions of methods like __delitem__, __eq__ and __init__. The purpose is aligning docstrings with Python implementation. But this doesn't work. Slot wrappers replace these descriptors. And docstings are standard docstrings for corresponding slot wrappers.
Thus this code doesn't work. And it looks dangerous, since functions are casted to incompatible function types. Even if they are never used, the compiler (gcc 8) produces warnings (see issue33012). May be this is even undefined behavior. In that case the compiler can generate arbitrary code.
I suggest to remove these definitions. |
|
Date |
User |
Action |
Args |
2018-03-08 18:39:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, eric.snow |
2018-03-08 18:39:09 | serhiy.storchaka | set | messageid: <1520534349.37.0.467229070634.issue33031@psf.upfronthosting.co.za> |
2018-03-08 18:39:09 | serhiy.storchaka | link | issue33031 messages |
2018-03-08 18:39:09 | serhiy.storchaka | create | |
|