[pypy-commit] pypy all_ordered_dicts: Add a comment

arigo noreply at buildbot.pypy.org
Tue Dec 16 19:09:15 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: all_ordered_dicts
Changeset: r74962:317f9db81f78
Date: 2014-12-16 18:09 +0000
http://bitbucket.org/pypy/pypy/changeset/317f9db81f78/

Log:	Add a comment

diff --git a/rpython/rtyper/lltypesystem/rordereddict.py b/rpython/rtyper/lltypesystem/rordereddict.py
--- a/rpython/rtyper/lltypesystem/rordereddict.py
+++ b/rpython/rtyper/lltypesystem/rordereddict.py
@@ -1143,6 +1143,10 @@
 
     entries = dic.entries
 
+    # find the last entry.  It's unclear if the loop below is still
+    # needed nowadays, because 'num_ever_used_items - 1' should always
+    # point to the last active item (we decrease it as needed in
+    # _ll_dict_del).  Better safe than sorry.
     while True:
         i = dic.num_ever_used_items - 1
         if entries.valid(i):


More information about the pypy-commit mailing list