On 29.01.2021 11:31, Masamichi Hosoda wrote:
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.

Thanks Masamichi,

it seems in line with similar patches that I have applied to some
other python sub packages

Have you a test case for this one ?

I will look to rebuilt python-cython after some extra check

Marco



--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to