[pypy-svn] pypy kqueue: a little work
alex_gaynor
commits-noreply at bitbucket.org
Sat Apr 9 22:49:56 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: kqueue
Changeset: r43264:cc37b011ea0f
Date: 2011-04-09 16:25 -0400
http://bitbucket.org/pypy/pypy/changeset/cc37b011ea0f/
Log: a little work
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
@@ -84,6 +84,19 @@
def descr_close(self, space):
self.close()
+ @unwrap_spec(max_events=int)
+ def descr_control(self, space, w_changelist, max_events, w_timeout=None):
+ self.check_closed(space)
+
+ if max_events < 0:
+ raise operationerrfmt(space.w_ValueError,
+ "Length of eventlist must be 0 or positive, got %d", max_events
+ )
+
+ if space.is_w(w_timeout, space.w_None):
+ timeoutspec =
+
+
W_Kqueue.typedef = TypeDef("select.kqueue",
__new__ = interp2app(W_Kqueue.descr__new__.im_func),
@@ -93,6 +106,7 @@
fileno = interp2app(W_Kqueue.descr_fileno),
close = interp2app(W_Kqueue.descr_close),
+ control = interp2app(W_Kqueue.descr_control),
)
W_Kqueue.typedef.acceptable_as_base_class = False
More information about the Pypy-commit
mailing list