From d84a8c8688a1de1dae42f48e6cb5a3c361cf03ee Mon Sep 17 00:00:00 2001
From: florent <florent@laas.fr>
Date: Sat, 18 Dec 2010 17:32:49 +0100
Subject: [PATCH] Set flags of dynamic loader so that symbols are global.

    * src/dynamic_graph/__init__.py.
---
 src/dynamic_graph/__init__.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/dynamic_graph/__init__.py b/src/dynamic_graph/__init__.py
index 965b0bf..c84a544 100644
--- a/src/dynamic_graph/__init__.py
+++ b/src/dynamic_graph/__init__.py
@@ -3,7 +3,15 @@ Copyright (c) 2010 CNRS
 Author: Florent Lamiraux
 """
 
+import sys, dl
+flags = sys.getdlopenflags()
+# Import C++ symbols in a global scope
+# This is necessary for signal compiled in different modules to be compatible
+sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
 from wrap import *
+# Recover previous flags
+sys.setdlopenflags(flags)
+
 import entity, signal_base
 import re
 
-- 
GitLab