[pypy-commit] pypy win64-stage1: fixed mmap.resize for win64

ctismer noreply at buildbot.pypy.org
Sat Nov 26 16:22:23 CET 2011


Author: Christian Tismer <tismer at stackless.com>
Branch: win64-stage1
Changeset: r49818:44a146430807
Date: 2011-11-26 15:51 +0100
http://bitbucket.org/pypy/pypy/changeset/44a146430807/

Log:	fixed mmap.resize for win64

diff --git a/pypy/rlib/rmmap.py b/pypy/rlib/rmmap.py
--- a/pypy/rlib/rmmap.py
+++ b/pypy/rlib/rmmap.py
@@ -222,6 +222,7 @@
             # XXX should be propagate the real type, allowing
             # for 2*sys.maxint?
             high = high_ref[0]
+            high = rffi.cast(lltype.Signed, high)
             # low might just happen to have the value INVALID_FILE_SIZE
             # so we need to check the last error also
             INVALID_FILE_SIZE = -1
@@ -544,7 +545,7 @@
             FILE_BEGIN = 0
             high_ref = lltype.malloc(PLONG.TO, 1, flavor='raw')
             try:
-                high_ref[0] = newsize_high
+                high_ref[0] = rffi.cast(LONG, newsize_high)
                 SetFilePointer(self.file_handle, newsize_low, high_ref,
                                FILE_BEGIN)
             finally:


More information about the pypy-commit mailing list