[pypy-commit] pypy py3k: merge default

pjenvey pypy.commits at gmail.com
Fri May 13 00:52:41 EDT 2016


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r84412:1ba51b01cb26
Date: 2016-05-12 21:51 -0700
http://bitbucket.org/pypy/pypy/changeset/1ba51b01cb26/

Log:	merge default

diff --git a/rpython/memory/gc/env.py b/rpython/memory/gc/env.py
--- a/rpython/memory/gc/env.py
+++ b/rpython/memory/gc/env.py
@@ -244,7 +244,9 @@
             size = data[start:end]
             if size[len(size)-1] not in ('K', 'k'):    # assume kilobytes for now
                 continue
-            number = int(size[:len(size)-1])* 1024
+            last = len(size) - 1
+            assert last >= 0
+            number = int(size[:last]) * 1024
             # for now we look for the smallest of the L2 caches of the CPUs
             if number < L2cache:
                 L2cache = number


More information about the pypy-commit mailing list