summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-10-07 19:18:22 (GMT)
committerGuido van Rossum <guido@python.org>1995-10-07 19:18:22 (GMT)
commit903f487684c25940c35f9b474c96e309842828c0 (patch)
treec94778e61d4cc240b59454475d2a8e3243af853a /Modules
parent1c45ca310bad0bf387b08765a052be6ebf26d667 (diff)
downloadcpython-903f487684c25940c35f9b474c96e309842828c0.zip
cpython-903f487684c25940c35f9b474c96e309842828c0.tar.gz
cpython-903f487684c25940c35f9b474c96e309842828c0.tar.bz2
add BGN/END_SAVE macros around fcntl/ioctl calls
Diffstat (limited to 'Modules')
-rw-r--r--Modules/fcntlmodule.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 9eb38c7..2299585 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -49,7 +49,10 @@ fcntl_fcntl(self, args)
return NULL;
}
memcpy(buf, str, len);
- if (fcntl(fd, code, buf) < 0) {
+ BGN_SAVE
+ ret = fcntl(fd, code, buf);
+ END_SAVE
+ if (ret < 0) {
err_errno(IOError);
return NULL;
}
@@ -64,7 +67,9 @@ fcntl_fcntl(self, args)
if (!getargs(args, "(iii)", &fd, &code, &arg))
return NULL;
}
+ BGN_SAVE
ret = fcntl(fd, code, arg);
+ END_SAVE
if (ret < 0) {
err_errno(IOError);
return NULL;
@@ -94,7 +99,10 @@ fcntl_ioctl(self, args)
return NULL;
}
memcpy(buf, str, len);
- if (ioctl(fd, code, buf) < 0) {
+ BGN_SAVE
+ ret = ioctl(fd, code, buf);
+ END_SAVE
+ if (ret < 0) {
err_errno(IOError);
return NULL;
}
@@ -109,7 +117,9 @@ fcntl_ioctl(self, args)
if (!getargs(args, "(iii)", &fd, &code, &arg))
return NULL;
}
+ BGN_SAVE
ret = ioctl(fd, code, arg);
+ END_SAVE
if (ret < 0) {
err_errno(IOError);
return NULL;