[pypy-svn] r57715 - pypy/dist/pypy/lib

fijal at codespeak.net fijal at codespeak.net
Mon Sep 1 13:16:31 CEST 2008


Author: fijal
Date: Mon Sep  1 13:16:30 2008
New Revision: 57715

Modified:
   pypy/dist/pypy/lib/_hashlib.py
Log:
Fix segfault on 64 bit. I think our ctypes are not too smart though and 
we need to fix it anyway at some point.


Modified: pypy/dist/pypy/lib/_hashlib.py
==============================================================================
--- pypy/dist/pypy/lib/_hashlib.py	(original)
+++ pypy/dist/pypy/lib/_hashlib.py	Mon Sep  1 13:16:30 2008
@@ -5,6 +5,8 @@
 # Note: OpenSSL on OS X only provides md5 and sha1
 libpath = ctypes.util.find_library('ssl')
 lib = CDLL(libpath) # Linux, OS X
+lib.EVP_get_digestbyname.restype = c_void_p
+lib.EVP_DigestInit.argtypes = [c_void_p, c_void_p]
 
 def bufferstr(x):
     if isinstance(x, basestring):



More information about the Pypy-commit mailing list