aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTat-Chee Wan (USM Signature)2013-11-15 13:44:29 +0800
committerTat-Chee Wan (USM Signature)2013-11-15 13:44:29 +0800
commit45a69802f8cd8e97ac7ef3dfb05265d10f4af4ea (patch)
tree0ba5663a9f5ff14282f87e3a595f0497d04f9555
parentd298d31111b8e81601512045ccc57fdacf8bd37a (diff)
this version works without having to mess with dyld preloading
By making symbols in compatdll global, we don't need to define DYLD_INSERT_LIBRARIES
-rw-r--r--pyfantom.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyfantom.py b/pyfantom.py
index 2e66b1f..daf9b17 100644
--- a/pyfantom.py
+++ b/pyfantom.py
@@ -83,7 +83,8 @@ else:
if not MACOSX_BTENABLE:
print "Loading IOBluetooth-Compat Library (", compatlibpath, ")"
# Need to set DYLD_FORCE_FLAT_NAMESPACE in env
- compatdll = ctypes.cdll.LoadLibrary(compatlibpath)
+ #compatdll = ctypes.cdll.LoadLibrary(compatlibpath)
+ compatdll = ctypes.CDLL(compatlibpath, ctypes.RTLD_GLOBAL)
# RTLD_NOW is set by ctypes and can't be overridden
# http://hg.python.org/cpython/file/2.7/Modules/_ctypes/callproc.c#l1432