python-cython C++ support patch
Marco Atzeri
marco.atzeri@gmail.com
Fri Jan 29 14:18:36 GMT 2021
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
More information about the Cygwin
mailing list