mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Close an improperly-closed verbatim environment.
This closes SF patch #496215. Add a little more detail to the example that had not been closed. Bugfix: this should be made part of 2.2.1.
This commit is contained in:
parent
10a3bb53a8
commit
8b8fe288b3
1 changed files with 6 additions and 3 deletions
|
@ -860,6 +860,9 @@ PyObject *item;
|
||||||
|
|
||||||
while (item = PyIter_Next(iter)) {
|
while (item = PyIter_Next(iter)) {
|
||||||
/* do something with item */
|
/* do something with item */
|
||||||
|
...
|
||||||
|
/* release reference when done */
|
||||||
|
Py_DECREF(item);
|
||||||
}
|
}
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
/* propogate error */
|
/* propogate error */
|
||||||
|
@ -867,6 +870,8 @@ if (PyErr_Occurred()) {
|
||||||
else {
|
else {
|
||||||
/* continue doing useful work */
|
/* continue doing useful work */
|
||||||
}
|
}
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
|
||||||
\section{Buffer Protocol \label{abstract-buffer}}
|
\section{Buffer Protocol \label{abstract-buffer}}
|
||||||
|
|
||||||
|
@ -897,7 +902,7 @@ else {
|
||||||
Returns \code{1} if \var{o} supports the single-segment readable
|
Returns \code{1} if \var{o} supports the single-segment readable
|
||||||
buffer interface. Otherwise returns \code{0}.
|
buffer interface. Otherwise returns \code{0}.
|
||||||
\versionadded{2.2}
|
\versionadded{2.2}
|
||||||
\enc{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
|
\begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
|
||||||
const char **buffer,
|
const char **buffer,
|
||||||
|
@ -909,5 +914,3 @@ else {
|
||||||
\code{0} and sets a \exception{TypeError} on error.
|
\code{0} and sets a \exception{TypeError} on error.
|
||||||
\versionadded{1.6}
|
\versionadded{1.6}
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue