[Python-checkins] r58311 - python/trunk/Objects/bufferobject.c
neal.norwitz
python-checkins at python.org
Thu Oct 4 08:00:48 CEST 2007
Author: neal.norwitz
Date: Thu Oct 4 08:00:48 2007
New Revision: 58311
Modified:
python/trunk/Objects/bufferobject.c
Log:
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
Modified: python/trunk/Objects/bufferobject.c
==============================================================================
--- python/trunk/Objects/bufferobject.c (original)
+++ python/trunk/Objects/bufferobject.c Thu Oct 4 08:00:48 2007
@@ -682,19 +682,6 @@
&start, &stop, &step, &slicelength) < 0)
return -1;
- pb = value ? value->ob_type->tp_as_buffer : NULL;
- if (pb == NULL ||
- pb->bf_getreadbuffer == NULL ||
- pb->bf_getsegcount == NULL) {
- PyErr_BadArgument();
- return -1;
- }
- if ((*pb->bf_getsegcount)(value, NULL) != 1) {
- /* ### use a different exception type/message? */
- PyErr_SetString(PyExc_TypeError,
- "single-segment buffer object expected");
- return -1;
- }
if ((othersize = (*pb->bf_getreadbuffer)(value, 0, &ptr2)) < 0)
return -1;
More information about the Python-checkins
mailing list