Commits

aholkner  committed 045573a

ctypes 1.0.0 compat

  • Participants
  • Parent commits cfbc1a2
  • Branches ctypes-soc

Comments (0)

Files changed (1)

 __version__ = '$Id: $'
 
 from ctypes import *
+from ctypes.util import find_library
 import sys
 
 # Private version checking declared before SDL.version can be
 class SDL_DLL:
     def __init__(self, library_name, version_function_name):
         self.library_name = library_name
+        self._dll = getattr(cdll, find_library(library_name))
+        '''
         if sys.platform == 'darwin':
             import ctypes.macholib.dyld
             library_name = ctypes.macholib.dyld.framework_find(library_name)
             self._dll = CDLL(library_name, RTLD_GLOBAL)
         else:
             self._dll = getattr(cdll, library_name)
+        '''
         
         # Get the version of the DLL we're using
         if version_function_name: