Message166380
> 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'. :-) |
|
Date |
User |
Action |
Args |
2012-07-25 10:29:12 | mark.dickinson | set | recipients:
+ mark.dickinson, loewis, gregory.p.smith, jcea, asvetlov, meador.inge, serhiy.storchaka |
2012-07-25 10:29:12 | mark.dickinson | set | messageid: <1343212152.25.0.124964823326.issue15402@psf.upfronthosting.co.za> |
2012-07-25 10:29:11 | mark.dickinson | link | issue15402 messages |
2012-07-25 10:29:11 | mark.dickinson | create | |
|