[pypy-commit] pypy py3.5-bz2-lzma: count diff too often

plan_rich pypy.commits at gmail.com
Thu Sep 29 10:19:54 EDT 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: py3.5-bz2-lzma
Changeset: r87445:c1062888fa88
Date: 2016-09-29 16:18 +0200
http://bitbucket.org/pypy/pypy/changeset/c1062888fa88/

Log:	count diff too often

diff --git a/pypy/module/bz2/interp_bz2.py b/pypy/module/bz2/interp_bz2.py
--- a/pypy/module/bz2/interp_bz2.py
+++ b/pypy/module/bz2/interp_bz2.py
@@ -468,8 +468,7 @@
                     bzreturn = BZ2_bzDecompress(self.bzs)
                     # add up the size that has not been processed
                     avail_in = rffi.getintfield(self.bzs, 'c_avail_in')
-                    total_in += avail_in
-                    self.left_to_process = total_in
+                    self.left_to_process = avail_in
                     if bzreturn == BZ_STREAM_END:
                         self.running = False
                         break
@@ -483,6 +482,7 @@
                             break
                         out.prepare_next_chunk()
 
+                self.left_to_process += total_in
                 res = out.make_result_string()
                 return self.space.newbytes(res)
 


More information about the pypy-commit mailing list