[New-bugs-announce] [issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword
Keith
report at bugs.python.org
Thu Jan 16 04:25:21 EST 2020
New submission from Keith <keithtangtw at gmail.com>:
The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword
For example, in warnings.h, we have the following code:
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) PyErr_WarnExplicitObject(
PyObject *category,
PyObject *message,
PyObject *filename,
int lineno,
PyObject *module,
PyObject *registry);
In modsupport.h we have the following code:
PyAPI_FUNC(int) PyModule_ExecDef(PyObject *module, PyModuleDef *def);
We can fix this by using a different identifier, for example “pyModule” instead of “module”
----------
components: C API
messages: 360103
nosy: aCuria
priority: normal
severity: normal
status: open
title: The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39355>
_______________________________________
More information about the New-bugs-announce
mailing list