[Python-checkins] CVS: python/dist/src/Doc/ext extending.tex,1.7,1.8
Fred L. Drake
fdrake@users.sourceforge.net
Wed, 28 Nov 2001 23:16:21 -0800
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory usw-pr-cvs1:/tmp/cvs-serv31588/ext
Modified Files:
extending.tex
Log Message:
Clarify the description of the creation of an owned reference from an API
function.
This closes SF bug #486657.
Index: extending.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/extending.tex,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** extending.tex 2001/11/29 05:02:34 1.7
--- extending.tex 2001/11/29 07:16:19 1.8
***************
*** 1292,1300 ****
with the reference. In particular, all functions whose function it is
to create a new object, such as \cfunction{PyInt_FromLong()} and
! \cfunction{Py_BuildValue()}, pass ownership to the receiver. Even if in
! fact, in some cases, you don't receive a reference to a brand new
! object, you still receive ownership of the reference. For instance,
! \cfunction{PyInt_FromLong()} maintains a cache of popular values and can
! return a reference to a cached item.
Many functions that extract objects from other objects also transfer
--- 1292,1300 ----
with the reference. In particular, all functions whose function it is
to create a new object, such as \cfunction{PyInt_FromLong()} and
! \cfunction{Py_BuildValue()}, pass ownership to the receiver. Even if
! the object is not actually new, you still receive ownership of a new
! reference to that object. For instance, \cfunction{PyInt_FromLong()}
! maintains a cache of popular values and can return a reference to a
! cached item.
Many functions that extract objects from other objects also transfer