[pypy-commit] pypy default: Don't forget the return value, so that ioctl works on int args.
Gabriel
noreply at buildbot.pypy.org
Thu Oct 18 15:28:22 CEST 2012
Author: Gabriel <g2p.code at gmail.com>
Branch:
Changeset: r58210:731e68c58945
Date: 2012-10-12 19:07 +0200
http://bitbucket.org/pypy/pypy/changeset/731e68c58945/
Log: Don't forget the return value, so that ioctl works on int args.
diff --git a/pypy/module/fcntl/interp_fcntl.py b/pypy/module/fcntl/interp_fcntl.py
--- a/pypy/module/fcntl/interp_fcntl.py
+++ b/pypy/module/fcntl/interp_fcntl.py
@@ -250,6 +250,9 @@
else:
intarg = rffi.cast(rffi.INT, intarg) # C long => C int
rv = ioctl_int(fd, op, intarg)
+ if rv < 0:
+ raise _get_error(space, "ioctl")
+ return space.wrap(rv)
try:
arg = space.bufferstr_w(w_arg)
More information about the pypy-commit
mailing list