[pypy-commit] pypy default: merge ongoing win32-cleanup into default, do not close branch

mattip noreply at buildbot.pypy.org
Wed Mar 7 00:21:54 CET 2012


Author: mattip
Branch: 
Changeset: r53250:961441b4f395
Date: 2012-03-07 00:29 +0200
http://bitbucket.org/pypy/pypy/changeset/961441b4f395/

Log:	merge ongoing win32-cleanup into default, do not close branch

diff --git a/pypy/module/_ffi/test/test__ffi.py b/pypy/module/_ffi/test/test__ffi.py
--- a/pypy/module/_ffi/test/test__ffi.py
+++ b/pypy/module/_ffi/test/test__ffi.py
@@ -100,7 +100,10 @@
         from _ffi import CDLL, types
         libm = CDLL(self.libm_name)
         pow_addr = libm.getaddressindll('pow')
-        assert pow_addr == self.pow_addr & (sys.maxint*2-1)
+        fff = sys.maxint*2-1
+        if sys.platform == 'win32':
+            fff = sys.maxint*2+1
+        assert pow_addr == self.pow_addr & fff
 
     def test_func_fromaddr(self):
         import sys
diff --git a/pypy/module/rctime/interp_time.py b/pypy/module/rctime/interp_time.py
--- a/pypy/module/rctime/interp_time.py
+++ b/pypy/module/rctime/interp_time.py
@@ -24,6 +24,7 @@
     from pypy.module.thread import ll_thread as thread
 
     eci = ExternalCompilationInfo(
+        post_include_bits = ["BOOL pypy_timemodule_setCtrlHandler(HANDLE event);"],
         separate_module_sources=['''
             #include <windows.h>
 
diff --git a/testrunner/runner.py b/testrunner/runner.py
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -24,13 +24,16 @@
     #Try to avoid opeing a dialog box if one of the tests causes a system error
     import ctypes
     winapi = ctypes.windll.kernel32
+    SetErrorMode = winapi.SetErrorMode
+    SetErrorMode.argtypes=[ctypes.c_int]
+
     SEM_FAILCRITICALERRORS = 1
     SEM_NOGPFAULTERRORBOX  = 2
     SEM_NOOPENFILEERRORBOX = 0x8000
     flags = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX
     #Since there is no GetErrorMode, do a double Set
-    old_mode = winapi.SetErrorMode(flags)
-    winapi.SetErrorMode(old_mode | flags)
+    old_mode = SetErrorMode(flags)
+    SetErrorMode(old_mode | flags)
 
     SIGKILL = SIGTERM = 0
     READ_MODE = 'rU'


More information about the pypy-commit mailing list