Merge pull request #19 from furlongm/master

fix 'No such file or directory' error on cygwin
This commit is contained in:
Ori Livneh 2016-08-03 09:45:55 -07:00 committed by GitHub
commit a90be87876
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ except AttributeError:
# 2. libffi masks the problem because after making the call it doesn't
# touch anything through esp and epilogue code restores a correct
# esp from ebp afterwards.
kernel32 = ctypes.cdll.kernel32
try:
kernel32 = ctypes.cdll.kernel32
except OSError: # 'No such file or directory'
kernel32 = ctypes.cdll.LoadLibrary('kernel32.dll')
else:
kernel32 = ctypes.windll.kernel32