Author: Maciej Fijalkowski <[email protected]>
Branch: rdict-experiments
Changeset: r59662:73c379658d78
Date: 2013-01-03 11:26 +0200
http://bitbucket.org/pypy/pypy/changeset/73c379658d78/

Log:    small fixes

diff --git a/pypy/rlib/dict.py b/pypy/rlib/dict.py
--- a/pypy/rlib/dict.py
+++ b/pypy/rlib/dict.py
@@ -59,7 +59,8 @@
         n = new_size
         self.indices = self._make_index(n)
         PERTURB_SHIFT = 5
-        for index, hashvalue in enumerate(self.hashlist):
+        for index in range(self.used):
+            hashvalue = self.values[index].key
             if hashvalue < 0:
                 perturb = -hashvalue
             else:
@@ -108,7 +109,7 @@
                 if self.filled * 3 > len(self.indices) * 2:
                     self._resize(4 * self.__len__())
         else:
-            self.valuelist[index] = value
+            self.values[index].value = value
 
     def __delitem__(self, key):
         hashvalue = hash(key)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to