[pypy-commit] pypy default: Probably fixes a rare bug involving dict.update() and objects with

arigo noreply at buildbot.pypy.org
Thu Oct 10 16:25:02 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r67291:47b3936d1f4a
Date: 2013-10-10 16:24 +0200
http://bitbucket.org/pypy/pypy/changeset/47b3936d1f4a/

Log:	Probably fixes a rare bug involving dict.update() and objects with
	custom __eq__() that hack at the dict

diff --git a/rpython/rtyper/lltypesystem/rdict.py b/rpython/rtyper/lltypesystem/rdict.py
--- a/rpython/rtyper/lltypesystem/rdict.py
+++ b/rpython/rtyper/lltypesystem/rdict.py
@@ -820,8 +820,9 @@
             entry = entries[i]
             hash = entries.hash(i)
             key = entry.key
+            value = entry.value
             j = ll_dict_lookup(dic1, key, hash)
-            _ll_dict_setitem_lookup_done(dic1, key, entry.value, hash, j)
+            _ll_dict_setitem_lookup_done(dic1, key, value, hash, j)
         i += 1
 ll_update.oopspec = 'dict.update(dic1, dic2)'
 


More information about the pypy-commit mailing list