[pypy-svn] r23073 - pypy/dist/pypy/rpython

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Feb 6 16:39:10 CET 2006


Author: cfbolz
Date: Mon Feb  6 16:39:07 2006
New Revision: 23073

Modified:
   pypy/dist/pypy/rpython/objectmodel.py
Log:
add a comment about the GC behaviour of an address: it does not keep an object
alive (thanks samuele)


Modified: pypy/dist/pypy/rpython/objectmodel.py
==============================================================================
--- pypy/dist/pypy/rpython/objectmodel.py	(original)
+++ pypy/dist/pypy/rpython/objectmodel.py	Mon Feb  6 16:39:07 2006
@@ -45,6 +45,8 @@
     obj.__class__ = FREED_OBJECT
 
 
+# the obtained address will not keep the object alive. e.g. if the object is
+# only reachable through an address, it might get collected
 def cast_ptr_to_adr(obj):
     from pypy.rpython.memory.lltypesimulation import simulatorptr
     assert isinstance(obj, simulatorptr)



More information about the Pypy-commit mailing list