[Python-checkins] r56174 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c
alexandre.vassalotti
python-checkins at python.org
Wed Jul 4 21:12:03 CEST 2007
Author: alexandre.vassalotti
Date: Wed Jul 4 21:12:03 2007
New Revision: 56174
Modified:
python/branches/cpy_merge/Modules/_bytes_iomodule.c
python/branches/cpy_merge/Modules/_string_iomodule.c
Log:
Remove useless asserts.
Py_ssize_t is an unsigned type, so it can't be negative.
Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c
==============================================================================
--- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original)
+++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Wed Jul 4 21:12:03 2007
@@ -47,7 +47,6 @@
*output = self->buf + self->pos;
assert(self->pos + len < PY_SSIZE_T_MAX);
- assert(len >= 0);
self->pos += len;
return len;
@@ -293,7 +292,6 @@
memcpy(raw_buffer, self->buf + self->pos, len);
assert(self->pos + len < PY_SSIZE_T_MAX);
- assert(len >= 0);
self->pos += len;
return PyInt_FromSsize_t(len);
Modified: python/branches/cpy_merge/Modules/_string_iomodule.c
==============================================================================
--- python/branches/cpy_merge/Modules/_string_iomodule.c (original)
+++ python/branches/cpy_merge/Modules/_string_iomodule.c Wed Jul 4 21:12:03 2007
@@ -47,7 +47,6 @@
*output = self->buf + self->pos;
assert(self->pos + len < PY_SSIZE_T_MAX);
- assert(len >= 0);
self->pos += len;
return len;
More information about the Python-checkins
mailing list