Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r55086:30724af5224f
Date: 2012-05-14 19:32 +0200
http://bitbucket.org/pypy/pypy/changeset/30724af5224f/
Log: merge
diff --git a/pypy/annotation/unaryop.py b/pypy/annotation/unaryop.py
--- a/pypy/annotation/unaryop.py
+++ b/pypy/annotation/unaryop.py
@@ -493,11 +493,11 @@
return SomeImpossibleValue()
getbookkeeper().count("str_join", str)
s_item = s_list.listdef.read_item()
- if isinstance(s_item, SomeImpossibleValue):
+ if s_None.contains(s_item):
if isinstance(str, SomeUnicodeString):
return immutablevalue(u"")
return immutablevalue("")
- no_nul = str.no_nul and getattr(s_item, 'no_nul', True)
+ no_nul = str.no_nul and s_item.no_nul
return str.basestringclass(no_nul=no_nul)
def iter(str):
diff --git a/pypy/module/select/interp_kqueue.py
b/pypy/module/select/interp_kqueue.py
--- a/pypy/module/select/interp_kqueue.py
+++ b/pypy/module/select/interp_kqueue.py
@@ -3,6 +3,7 @@
from pypy.interpreter.gateway import interp2app, unwrap_spec
from pypy.interpreter.typedef import TypeDef, generic_new_descr, GetSetProperty
from pypy.rlib._rsocket_rffi import socketclose
+from pypy.rlib.rarithmetic import r_uint
from pypy.rpython.lltypesystem import rffi, lltype
from pypy.rpython.tool import rffi_platform
from pypy.translator.tool.cbuild import ExternalCompilationInfo
@@ -226,9 +227,12 @@
if self.event:
lltype.free(self.event, flavor="raw")
- @unwrap_spec(filter=int, flags='c_uint', fflags='c_uint', data=int,
udata='c_uint')
- def descr__init__(self, space, w_ident, filter=KQ_FILTER_READ,
flags=KQ_EV_ADD, fflags=0, data=0, udata=0):
- ident = space.c_filedescriptor_w(w_ident)
+ @unwrap_spec(filter=int, flags='c_uint', fflags='c_uint', data=int,
udata=r_uint)
+ def descr__init__(self, space, w_ident, filter=KQ_FILTER_READ,
flags=KQ_EV_ADD, fflags=0, data=0, udata=r_uint(0)):
+ if space.isinstance_w(w_ident, space.w_long):
+ ident = space.uint_w(w_ident)
+ else:
+ ident = r_uint(space.c_filedescriptor_w(w_ident))
self.event = lltype.malloc(kevent, flavor="raw")
rffi.setintfield(self.event, "c_ident", ident)
@@ -320,7 +324,7 @@
return space.wrap(self.event.c_data)
def descr_get_udata(self, space):
- return space.wrap(rffi.cast(rffi.SIZE_T, self.event.c_udata))
+ return space.wrap(rffi.cast(rffi.UINTPTR_T, self.event.c_udata))
W_Kevent.typedef = TypeDef("select.kevent",
diff --git a/pypy/module/signal/test/test_signal.py
b/pypy/module/signal/test/test_signal.py
--- a/pypy/module/signal/test/test_signal.py
+++ b/pypy/module/signal/test/test_signal.py
@@ -61,8 +61,6 @@
received.append(signum)
signal.signal(signum, myhandler)
- print dir(os)
-
os.kill(os.getpid(), signum)
# the signal should be delivered to the handler immediately
assert received == [signum]
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit