python-cython C++ support patch

Masamichi Hosoda trueroad@trueroad.jp
Fri Jan 29 10:31:43 GMT 2021


Hi,

I've found that modules built by python-cython with C++ could not be loaded.
If I understand correctly, the following patch fixes it.
Would you like to apply this patch to the package?

```
--- a/Cython-0.29.21/Cython/Utility/ModuleSetupCode.c
+++ b/Cython-0.29.21/Cython/Utility/ModuleSetupCode.c
@@ -709,7 +709,11 @@
 /////////////// PyModInitFuncType.proto ///////////////
 
 #ifndef CYTHON_NO_PYINIT_EXPORT
+#ifdef __cplusplus
+#define __Pyx_PyMODINIT_FUNC  extern "C" PyObject *
+#else
 #define __Pyx_PyMODINIT_FUNC  PyObject *
+#endif
 
 #elif PY_MAJOR_VERSION < 3
 // Py2: define this to void manually because PyMODINIT_FUNC adds __declspec(dllexport) to it's definition.
```

Thanks.


More information about the Cygwin mailing list