Added version annotations, remove hard tabs.

This commit is contained in:
Fred Drake 2001-11-09 23:34:26 +00:00
parent 9f64caaf00
commit 94ead57dc3
1 changed files with 11 additions and 7 deletions

View File

@ -868,42 +868,46 @@ else {
/* continue doing useful work */ /* continue doing useful work */
} }
\section{Buffer Protocol \label{buffer}} \section{Buffer Protocol \label{abstract-buffer}}
\begin{cfuncdesc}{int}{PyObject_AsCharBuffer}{PyObject *obj, \begin{cfuncdesc}{int}{PyObject_AsCharBuffer}{PyObject *obj,
const char **buffer, const char **buffer,
int *buffer_len} int *buffer_len}
Returns a pointer to a read-only memory location useable as character- Returns a pointer to a read-only memory location useable as character-
based input. The \var{obj} argument must support the single-segment based input. The \var{obj} argument must support the single-segment
character buffer interface. On success, returns \code{1}, sets character buffer interface. On success, returns \code{1}, sets
\var{buffer} to the memory location and \var{buffer} to the buffer \var{buffer} to the memory location and \var{buffer} to the buffer
length. Returns \code{0} and sets a \exception{TypeError} on error. length. Returns \code{0} and sets a \exception{TypeError} on error.
\versionadded{1.6}
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_AsReadBuffer}{PyObject *obj, \begin{cfuncdesc}{int}{PyObject_AsReadBuffer}{PyObject *obj,
const char **buffer, const char **buffer,
int *buffer_len} int *buffer_len}
Returns a pointer to a read-only memory location containing Returns a pointer to a read-only memory location containing
arbitrary data. The \var{obj} argument must support the arbitrary data. The \var{obj} argument must support the
single-segment readable buffer interface. On success, returns single-segment readable buffer interface. On success, returns
\code{1}, sets \var{buffer} to the memory location and \var{buffer} \code{1}, sets \var{buffer} to the memory location and \var{buffer}
to the buffer length. Returns \code{0} and sets a to the buffer length. Returns \code{0} and sets a
\exception{TypeError} on error. \exception{TypeError} on error.
\versionadded{1.6}
\end{cfuncdesc} \end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_CheckReadBuffer}{PyObject *o} \begin{cfuncdesc}{int}{PyObject_CheckReadBuffer}{PyObject *o}
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}
\enc{cfuncdesc} \enc{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj, \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
const char **buffer, const char **buffer,
int *buffer_len} int *buffer_len}
Returns a pointer to a writeable memory location. The \var{obj} Returns a pointer to a writeable memory location. The \var{obj}
argument must support the single-segment, character buffer argument must support the single-segment, character buffer
interface. On success, returns \code{1}, sets \var{buffer} to the interface. On success, returns \code{1}, sets \var{buffer} to the
memory location and \var{buffer} to the buffer length. Returns memory location and \var{buffer} to the buffer length. Returns
\code{0} and sets a \exception{TypeError} on error. \code{0} and sets a \exception{TypeError} on error.
\versionadded{1.6}
\end{cfuncdesc} \end{cfuncdesc}
\end{verbatim} \end{verbatim}