Bug Report: Python C library not compatible with C++2020
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" This e-mail and any attachments are only for the use of the intended recipient and may contain material that is confidential, privileged and/or protected by the Official Secrets Act. If you are not the intended recipient, please delete it or notify the sender immediately. Please do not copy or use it for any purpose or disclose the contents to any other person.
Hi! Thanks for reporting, but as it's not related to the documentation but more about core Python you'll have more visitility by posting it to https://bugs.python.org Bests, -- Julien Palard https://mdk.fr ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday 16 January 2020 10:09, Tang Tien Wei Keith <keith_tang@i2r.a-star.edu.sg> wrote:
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,
intlineno,
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”
This e-mail and any attachments are only for the use of the intended recipient and may contain material that is confidential, privileged and/or protected by the Official Secrets Act. If you are not the intended recipient, please delete it or notify the sender immediately. Please do not copy or use it for any purpose or disclose the contents to any other person.
Hello, Thanks for the heads up, I have just posted it at the link you mentioned. Cheers! Keith From: Julien Palard [mailto:julien@palard.fr] Sent: Thursday, January 16, 2020 5:22 PM To: Tang Tien Wei Keith <keith_tang@i2r.a-star.edu.sg> Cc: docs@python.org Subject: Re: [docs] Bug Report: Python C library not compatible with C++2020 Hi! Thanks for reporting, but as it's not related to the documentation but more about core Python you'll have more visitility by posting it to https://bugs.python.org Bests, -- Julien Palard https://mdk.fr ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday 16 January 2020 10:09, Tang Tien Wei Keith <keith_tang@i2r.a-star.edu.sg<mailto:keith_tang@i2r.a-star.edu.sg>> wrote: 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” This e-mail and any attachments are only for the use of the intended recipient and may contain material that is confidential, privileged and/or protected by the Official Secrets Act. If you are not the intended recipient, please delete it or notify the sender immediately. Please do not copy or use it for any purpose or disclose the contents to any other person. This e-mail and any attachments are only for the use of the intended recipient and may contain material that is confidential, privileged and/or protected by the Official Secrets Act. If you are not the intended recipient, please delete it or notify the sender immediately. Please do not copy or use it for any purpose or disclose the contents to any other person.
participants (2)
-
Julien Palard -
Tang Tien Wei Keith