summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-12 08:04:00 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-12 08:04:00 (GMT)
commitc1e4f9dd92a2b63b26b06035f8c8ee1a5eb52ab3 (patch)
tree9bac712f5696672bf2817eeda0b515e9aa891653 /Doc
parent989ddc0709e98c1a5b3480e0843cf7896fd2909e (diff)
downloadcpython-c1e4f9dd92a2b63b26b06035f8c8ee1a5eb52ab3.zip
cpython-c1e4f9dd92a2b63b26b06035f8c8ee1a5eb52ab3.tar.gz
cpython-c1e4f9dd92a2b63b26b06035f8c8ee1a5eb52ab3.tar.bz2
Use a new macro, PySequence_Fast_ITEMS to factor out code common to
three recent optimizations. Aside from reducing code volume, it increases readability.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/api/abstract.tex7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex
index f19928f..b38bc91 100644
--- a/Doc/api/abstract.tex
+++ b/Doc/api/abstract.tex
@@ -830,6 +830,13 @@ determination.
and that \var{i} is within bounds.
\end{cfuncdesc}
+\begin{cfuncdesc}{PyObject**}{PySequence_Fast_ITEMS}{PyObject *o}
+ Return the underlying array of PyObject pointers. Assumes that
+ \var{o} was returned by \cfunction{PySequence_Fast()} and
+ \var{o} is not \NULL.
+ \versionadded{2.4}
+\end{cfuncdesc}
+
\begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i}
Return the \var{i}th element of \var{o} or \NULL{} on failure.
Macro form of \cfunction{PySequence_GetItem()} but without checking