[pypy-commit] pypy default: Translation fix

arigo noreply at buildbot.pypy.org
Sat Jan 12 23:44:04 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r60005:0f1e91da6cb2
Date: 2013-01-12 23:47 +0100
http://bitbucket.org/pypy/pypy/changeset/0f1e91da6cb2/

Log:	Translation fix

diff --git a/pypy/module/signal/interp_signal.py b/pypy/module/signal/interp_signal.py
--- a/pypy/module/signal/interp_signal.py
+++ b/pypy/module/signal/interp_signal.py
@@ -40,6 +40,7 @@
 includes = ['stdlib.h', 'src/signals.h']
 if sys.platform != 'win32':
     includes.append('sys/time.h')
+WIN32 = sys.platform == 'win32'
 
 cdir = py.path.local(autopath.pypydir).join('translator', 'c')
 
@@ -236,7 +237,7 @@
     None -- if an unknown handler is in effect (XXX UNIMPLEMENTED)
     anything else -- the callable Python object used as a handler
     """
-    if sys.platform == 'win32':
+    if WIN32:
         check_signum_exists(space, signum)
     else:
         check_signum_in_range(space, signum)


More information about the pypy-commit mailing list