Martin Panter <vadmium...@gmail.com> added the comment:

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.

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to