diff options
Diffstat (limited to 'magic/compat.py')
-rw-r--r-- | magic/compat.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/magic/compat.py b/magic/compat.py index 7b39691..e2d71ee 100644 --- a/magic/compat.py +++ b/magic/compat.py @@ -12,16 +12,10 @@ from ctypes import * from ctypes.util import find_library -def _init(): - """ - Loads the shared library through ctypes and returns a library - L{ctypes.CDLL} instance - """ - return ctypes.cdll.LoadLibrary(find_library('magic')) - +from . import loader _libraries = {} -_libraries['magic'] = _init() +_libraries['magic'] = loader.load_lib() # Flag constants for open and setflags MAGIC_NONE = NONE = 0 |