Author: Armin Rigo <[email protected]>
Branch:
Changeset: r83124:263d68316ae2
Date: 2016-03-18 10:46 +0100
http://bitbucket.org/pypy/pypy/changeset/263d68316ae2/
Log: add comment
diff --git a/rpython/rlib/rawrefcount.py b/rpython/rlib/rawrefcount.py
--- a/rpython/rlib/rawrefcount.py
+++ b/rpython/rlib/rawrefcount.py
@@ -72,6 +72,12 @@
return p
def next_dead(OB_PTR_TYPE):
+ """NOT_RPYTHON. When the GC runs, it finds some pyobjs to be dead
+ but cannot immediately dispose of them (it doesn't know how to call
+ e.g. tp_dealloc(), and anyway calling it immediately would cause all
+ sorts of bugs). So instead, it stores them in an internal list,
+ initially with refcnt == 1. This pops the next item off this list.
+ """
if len(_d_list) == 0:
return lltype.nullptr(OB_PTR_TYPE.TO)
ob = _d_list.pop()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit