[issue43816] Missing 'extern "C"' for _Py_ctype_table

Andrew V. Jones report at bugs.python.org
Mon Apr 12 11:55:57 EDT 2021


Andrew V. Jones <andrewvaughanj at gmail.com> added the comment:

> I am happy to re-assign this as a Cython bug, but the fact it is fixed with an `extern "C"` in Python.h, really makes it feel like it is a Python-proper issue and not a "user" issue.
>

Just to extend on this:

    1) The Cython-generated code uses `Py_ISSPACE` (and not `_Py_ctype_table`), but the expansion of the macro `Py_ISSPACE` then adds `_Py_ctype_table` to the user's code

    2) The "user-fix" is to wrap `#include <Python.h>` in `extern "C"` -- however, given other parts of Python.h already do this, it seems extraneous to expect a C++ user to wrap Python.h in this way

----------

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


More information about the Python-bugs-list mailing list