Message314795
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. |
|
Date |
User |
Action |
Args |
2018-04-02 03:52:54 | martin.panter | set | recipients:
+ martin.panter, serhiy.storchaka, ztane, siddhesh, cstratak |
2018-04-02 03:52:53 | martin.panter | set | messageid: <1522641173.99.0.467229070634.issue33012@psf.upfronthosting.co.za> |
2018-04-02 03:52:53 | martin.panter | link | issue33012 messages |
2018-04-02 03:52:53 | martin.panter | create | |
|