Commit b1b71405 authored by Tiago Peixoto's avatar Tiago Peixoto

Dump dl module in favor of ctypes

The module dl has been deprecated, and has been replaced by ctypes. This
also fixes a problem where the dlopen() flags have different numbers in
different architectures.
parent c68ed7e8
......@@ -19,12 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
try:
from dl import RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL
except ImportError:
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 256
from DLFCN import RTLD_LAZY, RTLD_GLOBAL
all = ["dl_import"]
......
......@@ -21,6 +21,7 @@ import sys, string, hashlib, os.path, re, glob
from .. import core
from .. import libgraph_tool_core
import numpy
import DLFCN
try:
import scipy.weave
......@@ -251,7 +252,7 @@ def inline(code, arg_names=None, local_dict=None,
# friends to work properly across DSO boundaries. See
# http://gcc.gnu.org/faq.html#dso
orig_dlopen_flags = sys.getdlopenflags()
sys.setdlopenflags(core.RTLD_NOW | core.RTLD_GLOBAL)
sys.setdlopenflags(DLFCN.RTLD_LAZY | DLFCN.RTLD_GLOBAL)
# call weave and pass all the updated kw arguments
ret_vals = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment