[issue33454] Mismatched C function signature in _xxsubinterpreters.channel_close()

Serhiy Storchaka report at bugs.python.org
Thu May 10 06:17:56 EDT 2018


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The C function that implements _xxsubinterpreters.channel_close() is defined with the signature

    PyObject *channel_close(PyObject *self, PyObject *args, PyObject *kwds)

which corresponds the method convention METH_VARARGS | METH_KEYWORDS, but is used with the incompatible method convention METH_VARARGS. Either the signature or flags are not correct.

Actually it can use just METH_O. The proposed PR changes both signature and flags and simplifies the implementation.

The bug was found thanks to gcc 8 emitting a warning for invalid function cast (it also emits a lot of false alarms). See also issue33012.

----------
components: Extension Modules
messages: 316354
nosy: eric.snow, serhiy.storchaka, siddhesh
priority: normal
severity: normal
status: open
title: Mismatched C function signature in _xxsubinterpreters.channel_close()
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33454>
_______________________________________


More information about the Python-bugs-list mailing list