[Python-checkins] r87917 - in python/branches/py3k/Modules: _io/fileio.c posixmodule.c
victor.stinner
python-checkins at python.org
Tue Jan 11 01:04:12 CET 2011
Author: victor.stinner
Date: Tue Jan 11 01:04:12 2011
New Revision: 87917
Log:
Issue #9611: remove useless and dangerous explicit conversion to size_t
Modified:
python/branches/py3k/Modules/_io/fileio.c
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Modules/_io/fileio.c
==============================================================================
--- python/branches/py3k/Modules/_io/fileio.c (original)
+++ python/branches/py3k/Modules/_io/fileio.c Tue Jan 11 01:04:12 2011
@@ -530,7 +530,7 @@
len = INT_MAX;
n = read(self->fd, pbuf.buf, (int)len);
#else
- n = read(self->fd, pbuf.buf, (size_t)len);
+ n = read(self->fd, pbuf.buf, len);
#endif
Py_END_ALLOW_THREADS
} else
@@ -716,7 +716,7 @@
len = INT_MAX;
n = write(self->fd, pbuf.buf, (int)len);
#else
- n = write(self->fd, pbuf.buf, (size_t)len);
+ n = write(self->fd, pbuf.buf, len);
#endif
Py_END_ALLOW_THREADS
} else
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Tue Jan 11 01:04:12 2011
@@ -5712,7 +5712,7 @@
len = INT_MAX;
size = write(fd, pbuf.buf, (int)len);
#else
- size = write(fd, pbuf.buf, (size_t)len);
+ size = write(fd, pbuf.buf, len);
#endif
Py_END_ALLOW_THREADS
PyBuffer_Release(&pbuf);
More information about the Python-checkins
mailing list