[pypy-svn] r29033 - pypy/dist/pypy/module/_weakref
pedronis at codespeak.net
pedronis at codespeak.net
Wed Jun 21 00:43:55 CEST 2006
Author: pedronis
Date: Wed Jun 21 00:43:54 2006
New Revision: 29033
Modified:
pypy/dist/pypy/module/_weakref/interp__weakref.py
Log:
fix some methods moving up to W_Root
Modified: pypy/dist/pypy/module/_weakref/interp__weakref.py
==============================================================================
--- pypy/dist/pypy/module/_weakref/interp__weakref.py (original)
+++ pypy/dist/pypy/module/_weakref/interp__weakref.py Wed Jun 21 00:43:54 2006
@@ -17,13 +17,13 @@
def __del__(self):
for i in range(len(self.addr_refs) - 1, -1, -1):
addr_ref = self.addr_refs[i]
- if cast_weakgcaddress_to_object(addr_ref, W_Root) is not None:
- w_ref = cast_weakgcaddress_to_object(addr_ref, W_Root)
+ w_ref = cast_weakgcaddress_to_object(addr_ref, W_WeakrefBase)
+ if w_ref is not None:
w_ref.invalidate()
for i in range(len(self.addr_refs) - 1, -1, -1):
addr_ref = self.addr_refs[i]
- if cast_weakgcaddress_to_object(addr_ref, W_Root) is not None:
- w_ref = cast_weakgcaddress_to_object(addr_ref, W_Root)
+ w_ref = cast_weakgcaddress_to_object(addr_ref, W_WeakrefBase)
+ if w_ref is not None:
w_ref.activate_callback()
def get_weakref(self, space, w_subtype, w_obj, w_callable):
More information about the Pypy-commit
mailing list