Author: Armin Rigo <ar...@tunes.org>
Branch: cpyext-gc-support
Changeset: r80271:5bfafb68e4e1
Date: 2015-10-16 13:40 +0200
http://bitbucket.org/pypy/pypy/changeset/5bfafb68e4e1/

Log:    tweaks

diff --git a/pypy/doc/discussion/rawrefcount.rst 
b/pypy/doc/discussion/rawrefcount.rst
--- a/pypy/doc/discussion/rawrefcount.rst
+++ b/pypy/doc/discussion/rawrefcount.rst
@@ -39,9 +39,8 @@
 
 rawrefcount.from_obj(p)
 
-    If there is a link from object 'p', and 'p' is not a
-    W_CPyExtPlaceHolderObject, returns the corresponding 'ob'.
-    Otherwise, returns NULL.
+    If there is a link from object 'p' made with create_link_pypy(),
+    returns the corresponding 'ob'.  Otherwise, returns NULL.
 
 rawrefcount.to_obj(Class, ob)
 
@@ -141,10 +140,13 @@
 PyPy side.  In this case, the PyTupleObject needs to hold real
 references to the PyObject items, and we use create_link_pypy()/
 REFCNT_FROM_PYPY.  In all cases, we have a C array of PyObjects
-that we can return from PySequence_Fast_ITEMS.
+that we can directly return from PySequence_Fast_ITEMS, PyTuple_ITEMS,
+PyTuple_GetItem, and so on.
 
 For <list> objects coming from PyPy, we can use a cpyext list
 strategy.  The list turns into a PyListObject, as if it had been
 allocated from C in the first place.  The special strategy can hold
-(only) a direct reference to the PyListObject, and we can use
-create_link_pyobj().  PySequence_Fast_ITEMS then works for lists too.
+(only) a direct reference to the PyListObject, and we can use either
+create_link_pyobj() or create_link_pypy() (to be decided).
+PySequence_Fast_ITEMS then works for lists too, and PyList_GetItem
+can return a borrowed reference, and so on.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to