[Python-3000-checkins] r55584 - python/branches/py3k-struni/Doc/api/concrete.tex

walter.doerwald python-3000-checkins at python.org
Fri May 25 16:14:36 CEST 2007

Author: walter.doerwald
Date: Fri May 25 16:14:31 2007
New Revision: 55584

Document the existence of PyUnicode_InternInPlace() and

Modified: python/branches/py3k-struni/Doc/api/concrete.tex
--- python/branches/py3k-struni/Doc/api/concrete.tex	(original)
+++ python/branches/py3k-struni/Doc/api/concrete.tex	Fri May 25 16:14:31 2007
@@ -1611,6 +1611,27 @@
   string. \code{-1} is returned if there was an error.
+\begin{cfuncdesc}{void}{PyUnicode_InternInPlace}{PyObject **string}
+  Intern the argument \var{*string} in place.  The argument must be
+  the address of a pointer variable pointing to a Python unicode string
+  object.  If there is an existing interned string that is the same as
+  \var{*string}, it sets \var{*string} to it (decrementing the
+  reference count of the old string object and incrementing the
+  reference count of the interned string object), otherwise it leaves
+  \var{*string} alone and interns it (incrementing its reference
+  count).  (Clarification: even though there is a lot of talk about
+  reference counts, think of this function as reference-count-neutral;
+  you own the object after the call if and only if you owned it before
+  the call.)
+\begin{cfuncdesc}{PyObject*}{PyUnicode_InternFromString}{const char *v}
+  A combination of \cfunction{PyUnicode_FromString()} and
+  \cfunction{PyUnicode_InternInPlace()}, returning either a new unicode
+  string object that has been interned, or a new (``owned'') reference to
+  an earlier interned string object with the same value.
 \subsection{Buffer Objects \label{bufferObjects}}
 \sectionauthor{Greg Stein}{gstein at lyra.org}

More information about the Python-3000-checkins mailing list