[pypy-svn] r70899 - pypy/trunk/pypy/module/__builtin__

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Jan 26 19:00:26 CET 2010


Author: cfbolz
Date: Tue Jan 26 19:00:25 2010
New Revision: 70899

Modified:
   pypy/trunk/pypy/module/__builtin__/interp_classobj.py
Log:
Be a bit on the paranoid side and make sure that the bases_w list of an
old-style class is not resizable.


Modified: pypy/trunk/pypy/module/__builtin__/interp_classobj.py
==============================================================================
--- pypy/trunk/pypy/module/__builtin__/interp_classobj.py	(original)
+++ pypy/trunk/pypy/module/__builtin__/interp_classobj.py	Tue Jan 26 19:00:25 2010
@@ -7,6 +7,7 @@
 from pypy.interpreter.baseobjspace import Wrappable
 from pypy.rlib.rarithmetic import r_uint, intmask
 from pypy.rlib.objectmodel import compute_identity_hash
+from pypy.rlib.debug import make_sure_not_resized
 
 
 def raise_type_err(space, argument, expected, w_obj):
@@ -51,6 +52,7 @@
 class W_ClassObject(Wrappable):
     def __init__(self, space, w_name, bases, w_dict):
         self.name = space.str_w(w_name)
+        make_sure_not_resized(bases)
         self.bases_w = bases
         self.w_dict = w_dict
  



More information about the Pypy-commit mailing list