summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Init.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2015-02-18 13:46:37 -0330
committerMatthew Newhook <matthew@zeroc.com>2015-02-18 13:46:37 -0330
commit423c2ea84e57ab4f75e841b0eebb134b3c33f8ca (patch)
tree659c6e43a08ce376ec4b0db13c61f99ab7acee4f /py/modules/IcePy/Init.cpp
parentChanges for brew, python PyPI packaging and ruby gem packaging. (diff)
downloadice-423c2ea84e57ab4f75e841b0eebb134b3c33f8ca.tar.bz2
ice-423c2ea84e57ab4f75e841b0eebb134b3c33f8ca.tar.xz
ice-423c2ea84e57ab4f75e841b0eebb134b3c33f8ca.zip
- Add IceLocatorDiscovery to the ruby and python extensions.
- Fix makegem.py/makepy.py accordingly. - #ifdef out the registerPlugin calls unless ICE_STATIC_LIBS is defined.
Diffstat (limited to 'py/modules/IcePy/Init.cpp')
-rw-r--r--py/modules/IcePy/Init.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/modules/IcePy/Init.cpp b/py/modules/IcePy/Init.cpp
index 5d1541af69a..4a5c0018a30 100644
--- a/py/modules/IcePy/Init.cpp
+++ b/py/modules/IcePy/Init.cpp
@@ -118,11 +118,14 @@ PyDoc_STRVAR(moduleDoc, "The Internet Communications Engine.");
#endif
+#ifdef ICE_STATIC_LIBS
extern "C"
{
Ice::Plugin* createIceSSL(const Ice::CommunicatorPtr&, const std::string&, const Ice::StringSeq&);
Ice::Plugin* createIceDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
+Ice::Plugin* createIceLocatorDiscovery(const Ice::CommunicatorPtr&, const string&, const Ice::StringSeq&);
}
+#endif
PyMODINIT_FUNC
#ifndef _WIN32 // On Windows, PyMODINIT_FUNC already defines dllexport
@@ -136,8 +139,12 @@ initIcePy(void)
{
PyObject* module;
+#ifdef ICE_STATIC_LIBS
+ // Register the plugins manually if we're building with static libraries.
Ice::registerPluginFactory("IceSSL", createIceSSL, false);
Ice::registerPluginFactory("IceDiscovery", createIceDiscovery, false);
+ Ice::registerPluginFactory("IceLocatorDiscovery", createIceLocatorDiscovery, false);
+#endif
//
// Notify Python that we are a multi-threaded extension.