diff options
author | Fred Drake <fdrake@acm.org> | 2001-11-29 07:16:19 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-11-29 07:16:19 (GMT) |
commit | 92024d1a99dff25d5a1e53e39292cbfb30d2a226 (patch) | |
tree | 6cdc56f7d08e650087016a28d39f422ed1008eca /Doc/ext | |
parent | 99181ac64ef7876edecc328d788b97174cd73128 (diff) | |
download | cpython-92024d1a99dff25d5a1e53e39292cbfb30d2a226.zip cpython-92024d1a99dff25d5a1e53e39292cbfb30d2a226.tar.gz cpython-92024d1a99dff25d5a1e53e39292cbfb30d2a226.tar.bz2 |
Clarify the description of the creation of an owned reference from an API
function.
This closes SF bug #486657.
Diffstat (limited to 'Doc/ext')
-rw-r--r-- | Doc/ext/extending.tex | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/ext/extending.tex b/Doc/ext/extending.tex index 6cd1137..e78e1d1 100644 --- a/Doc/ext/extending.tex +++ b/Doc/ext/extending.tex @@ -1291,11 +1291,11 @@ transferred with the reference or not. Most functions that return a reference to an object pass on ownership 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. +\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 ownership with the reference, for instance |