Author: mattip <[email protected]>
Branch: 
Changeset: r57251:0f17f1697183
Date: 2012-09-08 23:59 +0300
http://bitbucket.org/pypy/pypy/changeset/0f17f1697183/

Log:    fix rurandom for windows blindly, could not find tests for it

diff --git a/pypy/rlib/rurandom.py b/pypy/rlib/rurandom.py
--- a/pypy/rlib/rurandom.py
+++ b/pypy/rlib/rurandom.py
@@ -7,6 +7,9 @@
 
 if sys.platform == 'win32':
     from pypy.rlib import rwin32
+    from pypy.translator.tool.cbuild import ExternalCompilationInfo
+    from pypy.rpython.tool import rffi_platform
+    from pypy.rpython.lltypesystem import lltype, rffi
 
     eci = ExternalCompilationInfo(
         includes = ['windows.h', 'wincrypt.h'],
@@ -43,7 +46,7 @@
         "Acquire context."
         # This handle is never explicitly released. The operating
         # system will release it when the process terminates.
-        with lltype.scoped_malloc(rffi.CArray(HCRYPTPROV), 1) as ptr:
+        with lltype.scoped_alloc(rffi.CArray(HCRYPTPROV), 1) as ptr:
             if not CryptAcquireContext(
                 ptr, None, None,
                 PROV_RSA_FULL, CRYPT_VERIFYCONTEXT):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to