[pypy-commit] pypy win64-stage1: Merge

ctismer noreply at buildbot.pypy.org
Tue Nov 29 23:29:25 CET 2011


Author: Christian Tismer <tismer at stackless.com>
Branch: win64-stage1
Changeset: r49983:f3c6d05cd02c
Date: 2011-11-29 23:15 +0100
http://bitbucket.org/pypy/pypy/changeset/f3c6d05cd02c/

Log:	Merge

diff --git a/pypy/objspace/std/test/test_longobject.py b/pypy/objspace/std/test/test_longobject.py
--- a/pypy/objspace/std/test/test_longobject.py
+++ b/pypy/objspace/std/test/test_longobject.py
@@ -225,6 +225,7 @@
         assert x ^ 0x555555555L == 0x5FFFFFFFFL
 
     def test_hash(self):
+        import sys
         # ints have the same hash as equal longs
         for i in range(-4, 14):
             assert hash(i) == hash(long(i))
@@ -233,6 +234,8 @@
         assert hash(1234567890123456789L) in (
             -1895067127,            # with 32-bit platforms
             1234567890123456789)    # with 64-bit platforms
+        assert hash(long(sys.maxint)) == sys.maxint
+        assert hash(long(-sys.maxint-1)) == -sys.maxint-1
 
     def test_math_log(self):
         import math
diff --git a/pypy/rpython/llinterp.py b/pypy/rpython/llinterp.py
--- a/pypy/rpython/llinterp.py
+++ b/pypy/rpython/llinterp.py
@@ -1019,6 +1019,7 @@
 
     def op_int_neg_ovf(self, x):
         assert is_valid_int(x)
+        assert isinstance(x, (int, long))
         try:
             return ovfcheck(-x)
         except OverflowError:
@@ -1026,6 +1027,7 @@
 
     def op_int_abs_ovf(self, x):
         assert is_valid_int(x)
+        assert isinstance(x, (int, long))
         try:
             return ovfcheck(abs(x))
         except OverflowError:
@@ -1034,6 +1036,7 @@
     def op_int_lshift_ovf(self, x, y):
         assert is_valid_int(x)
         assert is_valid_int(y)
+        assert isinstance(y, (int, long))
         try:
             return ovfcheck(x << y)
         except OverflowError:
diff --git a/pypy/rpython/lltypesystem/ll2ctypes.py b/pypy/rpython/lltypesystem/ll2ctypes.py
--- a/pypy/rpython/lltypesystem/ll2ctypes.py
+++ b/pypy/rpython/lltypesystem/ll2ctypes.py
@@ -15,6 +15,7 @@
     load_library_kwargs = {}
 
 import os, platform as host_platform
+from pypy import conftest
 from pypy.rpython.lltypesystem import lltype, llmemory
 from pypy.rpython.extfunc import ExtRegistryEntry
 from pypy.rlib.objectmodel import Symbolic, ComputedIntSymbolic
diff --git a/pypy/rpython/lltypesystem/lltype.py b/pypy/rpython/lltypesystem/lltype.py
--- a/pypy/rpython/lltypesystem/lltype.py
+++ b/pypy/rpython/lltypesystem/lltype.py
@@ -1,7 +1,8 @@
 import py
 from pypy.rlib.rarithmetic import (r_int, r_uint, intmask, r_singlefloat,
                                    r_ulonglong, r_longlong, r_longfloat,
-                                   base_int, normalizedinttype, longlongmask)
+                                   base_int, normalizedinttype, longlongmask,
+                                   r_uint32)
 from pypy.rlib.objectmodel import Symbolic
 from pypy.tool.uid import Hashable
 from pypy.tool.identity_dict import identity_dict
diff --git a/pypy/rpython/module/ll_os.py b/pypy/rpython/module/ll_os.py
--- a/pypy/rpython/module/ll_os.py
+++ b/pypy/rpython/module/ll_os.py
@@ -444,9 +444,14 @@
 
         if config['HAVE_UTIMES']:
             class CConfig:
-                _compilation_info_ = ExternalCompilationInfo(
+                if not _WIN32:
+                    _compilation_info_ = ExternalCompilationInfo(
                     includes = includes
-                )
+                    )
+                else:
+                    _compilation_info_ = ExternalCompilationInfo(
+                        includes = ['time.h']
+                    )
                 TIMEVAL = platform.Struct('struct timeval', [('tv_sec', rffi.LONG),
                                                              ('tv_usec', rffi.LONG)])
             config = platform.configure(CConfig)


More information about the pypy-commit mailing list