Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r58023:4ed34f124429
Date: 2012-10-12 10:19 +0200
http://bitbucket.org/pypy/pypy/changeset/4ed34f124429/

Log:    fix some modules

diff --git a/pypy/module/_multiprocessing/interp_connection.py 
b/pypy/module/_multiprocessing/interp_connection.py
--- a/pypy/module/_multiprocessing/interp_connection.py
+++ b/pypy/module/_multiprocessing/interp_connection.py
@@ -1,7 +1,7 @@
 from __future__ import with_statement
 from pypy.interpreter.baseobjspace import Wrappable
 from pypy.interpreter.typedef import TypeDef, GetSetProperty
-from pypy.interpreter.gateway import interp2app, unwrap_spec
+from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
 from pypy.interpreter.error import (
     OperationError, wrap_oserror, operationerrfmt)
 from pypy.rpython.lltypesystem import rffi, lltype
@@ -163,7 +163,8 @@
 
         return w_unpickled
 
-    def poll(self, space, w_timeout=0.0):
+    @unwrap_spec(w_timeout=WrappedDefault(0.0))
+    def poll(self, space, w_timeout):
         self._check_readable(space)
         if space.is_w(w_timeout, space.w_None):
             timeout = -1.0 # block forever
diff --git a/pypy/module/_multiprocessing/interp_semaphore.py 
b/pypy/module/_multiprocessing/interp_semaphore.py
--- a/pypy/module/_multiprocessing/interp_semaphore.py
+++ b/pypy/module/_multiprocessing/interp_semaphore.py
@@ -318,7 +318,7 @@
     def semlock_acquire(self, space, block, w_timeout):
         if not block:
             deadline = lltype.nullptr(TIMESPECP.TO)
-        elif space.is_w(w_timeout, space.w_None):
+        elif space.is_none(w_timeout):
             deadline = lltype.nullptr(TIMESPECP.TO)
         else:
             timeout = space.float_w(w_timeout)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to