Message313452
| Author |
serhiy.storchaka |
| Recipients |
eric.snow, serhiy.storchaka |
| Date |
2018年03月08日.18:39:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1520534349.37.0.467229070634.issue33031@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|