[pypy-commit] pypy default: Mark a few fields as immutable on dict multi iterator objects.

alex_gaynor noreply at buildbot.pypy.org
Sun Jul 10 09:43:52 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r45448:8457c1f2cc6c
Date: 2011-07-10 00:43 -0700
http://bitbucket.org/pypy/pypy/changeset/8457c1f2cc6c/

Log:	Mark a few fields as immutable on dict multi iterator objects.

diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -736,6 +736,8 @@
 class W_DictMultiIterObject(W_Object):
     from pypy.objspace.std.dicttype import dictiter_typedef as typedef
 
+    _immutable_fields_ = ["iteratorimplementation", "itertype"]
+
     def __init__(w_self, space, iteratorimplementation, itertype):
         w_self.space = space
         w_self.iteratorimplementation = iteratorimplementation


More information about the pypy-commit mailing list