Diff of /Modules/cjkcodecs/multibytecodec.c [88c94a] .. [278842]  Maximize  Restore

Repo status: analyzing...

  Switch to side-by-side view

--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -705,8 +705,6 @@
 	cres = NULL;
 
 	for (;;) {
-		int endoffile;
-
 		if (sizehint < 0)
 			cres = PyObject_CallMethod(self->stream,
 					(char *)method, NULL);
@@ -722,8 +720,6 @@
 					"non-string object");
 			goto errorexit;
 		}
-
-		endoffile = (PyString_GET_SIZE(cres) == 0);
 
 		if (self->pendingsize > 0) {
 			PyObject *ctr;
@@ -776,7 +772,7 @@
 					goto errorexit;
 			}
 
-		if (endoffile || sizehint < 0) { /* end of file */
+		if (rsize == 0 || sizehint < 0) { /* end of file */
 			if (buf.inbuf < buf.inbuf_end &&
 			    multibytecodec_decerror(self->codec, &self->state,
 					&buf, self->errors, MBERR_TOOFEW))

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks