[pypy-svn] r74402 - pypy/trunk/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Thu May 6 02:55:45 CEST 2010


Author: afa
Date: Thu May  6 02:55:44 2010
New Revision: 74402

Modified:
   pypy/trunk/pypy/module/cpyext/pyobject.py
Log:
rdict.get() seems to require the default value


Modified: pypy/trunk/pypy/module/cpyext/pyobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/pyobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/pyobject.py	Thu May  6 02:55:44 2010
@@ -333,7 +333,7 @@
 def forget_borrowee(space, w_obj):
     "De-register an object from the list of borrowed references"
     state = space.fromcache(State)
-    ref = state.py_objects_w2r.get(w_obj)
+    ref = state.py_objects_w2r.get(w_obj, lltype.nullptr(PyObject.TO))
     if not ref:
         if DEBUG_REFCOUNT:
             print >>sys.stderr, "Borrowed object is already gone:", \



More information about the Pypy-commit mailing list