Author martin.panter
Recipients cstratak, martin.panter, serhiy.storchaka, siddhesh, ztane
Date 2018-04-02.03:52:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522641173.99.0.467229070634.issue33012@psf.upfronthosting.co.za>
In-reply-to
Content
Siddhesh, it looks like your fixes make the C function signatures match the signature expected in the PyMethodDef structure. If so, I suggest to remove the (PyCFunction) casts from those structure definitions as well. For instance, now that we have

  PyObject *Noddy_name(Noddy *self, PyObject *Py_UNUSED(ignored))

I suggest changing

  PyMethodDef Noddy_methods[] = {
      {"name", (PyCFunction)Noddy_name, METH_NOARGS, ...

to

  PyMethodDef Noddy_methods[] = {
      {"name", Noddy_name, METH_NOARGS, ...

I suspect the casts were only added to hide compiler warnings related to this bug.

If you are proposing to add an ellipsis (...) to the definition of PyCFunction, that seems misguided. I understand this is incompatible under standard C. Are you relying on a GCC extension perhaps? Python is used with other compilers too.
History
Date User Action Args
2018-04-02 03:52:54martin.pantersetrecipients: + martin.panter, serhiy.storchaka, ztane, siddhesh, cstratak
2018-04-02 03:52:53martin.pantersetmessageid: <1522641173.99.0.467229070634.issue33012@psf.upfronthosting.co.za>
2018-04-02 03:52:53martin.panterlinkissue33012 messages
2018-04-02 03:52:53martin.pantercreate