[pypy-commit] pypy default: I'm stupid today'

fijal noreply at buildbot.pypy.org
Tue Oct 28 23:14:47 CET 2014


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r74272:74e73a3d7efb
Date: 2014-10-28 18:46 +0100
http://bitbucket.org/pypy/pypy/changeset/74e73a3d7efb/

Log:	I'm stupid today' hg push

diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -63,13 +63,11 @@
     """Unpin 'obj', allowing it to move again.
     Must only be called after a call to pin(obj) returned True.
     """
-    i = 0
-    while i < len(_pinned_objects):
+    for i in range(len(_pinned_objects)):
         try:
             if _pinned_objects[i] == obj:
                 del _pinned_objects[i]
-            else:
-                i += 1
+                return
         except TypeError:
             pass
 


More information about the pypy-commit mailing list