Message166380
| Author |
mark.dickinson |
| Recipients |
asvetlov, gregory.p.smith, jcea, loewis, mark.dickinson, meador.inge, serhiy.storchaka |
| Date |
2012年07月25日.10:29:11 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1343212152.25.0.124964823326.issue15402@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> The compiler has no chance to find out. You cast the pointer to
> PyCFunction, telling the compiler that it really is a PyCFunction.
True; I was thinking that the compiler should have the necessary information to warn about the suspicious (PyCFunction) cast. But then again the function pointer cast is perfectly legal---it's the subsequent call that invokes undefined behaviour, and that's in a different file, so the compiler can't help.
> "Everywhere" is nowhere close to the truth.
Yep, sorry; bad wording on my part. I didn't intend to imply that all uses of METH_NOARGS had this problem. 'Everywhere' for very small values of 'everywhere'. :-) |
|