[pypy-svn] r40166 - pypy/dist/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Sat Mar 10 16:26:58 CET 2007


Author: arigo
Date: Sat Mar 10 16:26:57 2007
New Revision: 40166

Modified:
   pypy/dist/pypy/objspace/std/typeobject.py
Log:
Argh! Argh! Argh! Argh.


Modified: pypy/dist/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/typeobject.py	(original)
+++ pypy/dist/pypy/objspace/std/typeobject.py	Sat Mar 10 16:26:57 2007
@@ -321,7 +321,7 @@
         if version_tag is None:
             tup = w_self._lookup_where(name)
             return tup
-        MASK = 1 << space.config.objspace.std.methodcachesizeexp - 1
+        MASK = (1 << space.config.objspace.std.methodcachesizeexp) - 1
         #method_hash = (id(version_tag) ^ position_hash ^ hash(name)) & MASK
         method_hash = ((id(version_tag) >> 3) ^ hash(name)) & MASK
         cached_version_tag = ec.method_cache_versions[method_hash]



More information about the Pypy-commit mailing list