From 45a69802f8cd8e97ac7ef3dfb05265d10f4af4ea Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM Signature) Date: Fri, 15 Nov 2013 13:44:29 +0800 Subject: 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 --- pyfantom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3