This is an automated email from the ASF dual-hosted git repository. damjan pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 827897c355691c72f37439b8706bc13261c25889 Author: Damjan Jovanovic <[email protected]> AuthorDate: Sat Jan 18 10:25:34 2020 +0200 pyuno: export the entrypoint for Python 3 from libpyuno Patch by: me --- main/pyuno/inc/pyuno/pyuno.hxx | 4 ++++ main/pyuno/source/module/pyuno_module.cxx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/main/pyuno/inc/pyuno/pyuno.hxx b/main/pyuno/inc/pyuno/pyuno.hxx index 1245921..cc5e366 100644 --- a/main/pyuno/inc/pyuno/pyuno.hxx +++ b/main/pyuno/inc/pyuno/pyuno.hxx @@ -76,7 +76,11 @@ preconditions: python has been initialized before and the global interpreter lock is held */ +#if PY_MAJOR_VERSION >= 3 +PY_DLLEXPORT PyMODINIT_FUNC PyInit_pyuno(); +#else extern "C" PY_DLLEXPORT void SAL_CALL initpyuno(); +#endif namespace pyuno diff --git a/main/pyuno/source/module/pyuno_module.cxx b/main/pyuno/source/module/pyuno_module.cxx index e44b0d3..b781035 100644 --- a/main/pyuno/source/module/pyuno_module.cxx +++ b/main/pyuno/source/module/pyuno_module.cxx @@ -746,7 +746,7 @@ static struct PyModuleDef PyUNOModule = } #if PY_MAJOR_VERSION >= 3 -extern "C" PyMODINIT_FUNC PyInit_pyuno(void) +PY_DLLEXPORT PyMODINIT_FUNC PyInit_pyuno() { PyObject *m;
