[Python-checkins] r56175 - 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 22:57:09 CEST 2007


Author: alexandre.vassalotti
Date: Wed Jul 4 22:57:09 2007
New Revision: 56175
Modified:
 python/branches/cpy_merge/Modules/_bytes_iomodule.c
 python/branches/cpy_merge/Modules/_string_iomodule.c
Log:
Revert to r56173, as per recommendation of Martin v. Löwis.
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 22:57:09 2007
@@ -47,6 +47,7 @@
 *output = self->buf + self->pos;
 
 assert(self->pos + len < PY_SSIZE_T_MAX);
+ assert(len >= 0);
 self->pos += len;
 
 return len;
@@ -292,6 +293,7 @@
 
 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 22:57:09 2007
@@ -47,6 +47,7 @@
 *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

AltStyle によって変換されたページ (->オリジナル) /