[pypy-svn] r46682 - pypy/dist/pypy/module/_weakref
arigo at codespeak.net
arigo at codespeak.net
Sun Sep 16 19:26:03 CEST 2007
Author: arigo
Date: Sun Sep 16 19:26:03 2007
New Revision: 46682
Modified:
pypy/dist/pypy/module/_weakref/interp__weakref.py
Log:
TODOs in module/_weakref.
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 Sun Sep 16 19:26:03 2007
@@ -70,11 +70,16 @@
class W_WeakrefBase(Wrappable):
def __init__(w_self, space, w_obj, w_callable):
+ # XXX should use None instead of w_None for w_callable,
+ # because if this fails before w_self is fully initialized
+ # we get a segfault in the __del__
w_self.space = space
w_self.w_obj_weak = weakref.ref(w_obj)
w_self.w_callable = w_callable
def dereference(self):
+ # XXX many callers would be simpler if this just returned None
+ # instead of w_None
w_obj = self.w_obj_weak()
if w_obj is None:
return self.space.w_None
More information about the Pypy-commit
mailing list