This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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