summaryrefslogtreecommitdiff
path: root/python/modules/IcePy/Init.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-06-08 10:47:55 -0400
committerJoe George <joe@zeroc.com>2015-06-08 13:51:04 -0400
commit74603420e7ce63d9d9e4217b3a0832d28dffc4a0 (patch)
tree481e6dc683892de1b02db1acc015e715468001c4 /python/modules/IcePy/Init.cpp
parentFixed ICE-6576 - csharp build fails trying to build removed config directory (diff)
downloadice-74603420e7ce63d9d9e4217b3a0832d28dffc4a0.tar.bz2
ice-74603420e7ce63d9d9e4217b3a0832d28dffc4a0.tar.xz
ice-74603420e7ce63d9d9e4217b3a0832d28dffc4a0.zip
Fix ICE-6569 - Python 3 build fails with GCC
Diffstat (limited to 'python/modules/IcePy/Init.cpp')
-rw-r--r--python/modules/IcePy/Init.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/modules/IcePy/Init.cpp b/python/modules/IcePy/Init.cpp
index 4de906407c4..0a594104b61 100644
--- a/python/modules/IcePy/Init.cpp
+++ b/python/modules/IcePy/Init.cpp
@@ -128,9 +128,12 @@ Ice::Plugin* createIceLocatorDiscovery(const Ice::CommunicatorPtr&, const string
}
#endif
+#if defined(__GNUC__) && PY_VERSION_HEX >= 0x03000000
+extern "C" __attribute__((visibility ("default"))) PyObject *
+#elif defined(_WIN32) // On Windows, PyMoDINIT_FUNC already defines dllexport
PyMODINIT_FUNC
-#ifndef _WIN32 // On Windows, PyMODINIT_FUNC already defines dllexport
-ICE_DECLSPEC_EXPORT
+#else
+PyMODINIT_FUNC ICE_DECLSPEC_EXPORT
#endif
#if PY_VERSION_HEX >= 0x03000000
PyInit_IcePy(void)