summaryrefslogtreecommitdiff
path: root/py/python/Ice.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/python/Ice.py')
-rw-r--r--py/python/Ice.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/py/python/Ice.py b/py/python/Ice.py
index e81cac2fc1d..a6db6375d7c 100644
--- a/py/python/Ice.py
+++ b/py/python/Ice.py
@@ -11,14 +11,23 @@
Ice module
"""
-import sys, exceptions, string, imp, os, threading
+import sys, exceptions, string, imp, os, threading, dl
+
+#
+# This is necessary for proper operation of Ice plug-ins.
+# Without it, RTTI problems can occur.
+#
+sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
+
+#
+# Import the Python extension.
+#
import IcePy
#
# Add some symbols to the Ice module.
#
ObjectPrx = IcePy.ObjectPrx
-Endpoint = IcePy.Endpoint
identityToString = IcePy.identityToString
stringToIdentity = IcePy.stringToIdentity
generateUUID = IcePy.generateUUID
@@ -120,6 +129,7 @@ sliceChecksums = {}
import Ice_BuiltinSequences_ice
import Ice_Communicator_ice
import Ice_Current_ice
+import Ice_Endpoint_ice
import Ice_Identity_ice
import Ice_LocalException_ice
import Ice_Locator_ice
@@ -131,6 +141,12 @@ import Ice_Router_ice
import Ice_ServantLocator_ice
#
+# Replace Endpoint with our implementation.
+#
+del Endpoint
+Endpoint = IcePy.Endpoint
+
+#
# Communicator wrapper.
#
class CommunicatorI(Communicator):