diff options
author | Fred Drake <fdrake@acm.org> | 2001-11-09 23:34:26 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-11-09 23:34:26 (GMT) |
commit | 94ead57dc3c4f1e3def90bae22bcf24786548af9 (patch) | |
tree | 67cc015d92a4ca76deacfb340ce6e48e56b48fc0 /Doc/api | |
parent | 9f64caaf00340fce95c2980435ef819e385cf5ff (diff) | |
download | cpython-94ead57dc3c4f1e3def90bae22bcf24786548af9.zip cpython-94ead57dc3c4f1e3def90bae22bcf24786548af9.tar.gz cpython-94ead57dc3c4f1e3def90bae22bcf24786548af9.tar.bz2 |
Added version annotations, remove hard tabs.
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/abstract.tex | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex index c6a19c2..166884b 100644 --- a/Doc/api/abstract.tex +++ b/Doc/api/abstract.tex @@ -868,42 +868,46 @@ else { /* continue doing useful work */ } -\section{Buffer Protocol \label{buffer}} +\section{Buffer Protocol \label{abstract-buffer}} \begin{cfuncdesc}{int}{PyObject_AsCharBuffer}{PyObject *obj, - const char **buffer, - int *buffer_len} + const char **buffer, + int *buffer_len} Returns a pointer to a read-only memory location useable as character- based input. The \var{obj} argument must support the single-segment character buffer interface. On success, returns \code{1}, sets \var{buffer} to the memory location and \var{buffer} to the buffer length. Returns \code{0} and sets a \exception{TypeError} on error. + \versionadded{1.6} \end{cfuncdesc} \begin{cfuncdesc}{int}{PyObject_AsReadBuffer}{PyObject *obj, - const char **buffer, - int *buffer_len} + const char **buffer, + int *buffer_len} Returns a pointer to a read-only memory location containing arbitrary data. The \var{obj} argument must support the single-segment readable buffer interface. On success, returns \code{1}, sets \var{buffer} to the memory location and \var{buffer} to the buffer length. Returns \code{0} and sets a \exception{TypeError} on error. + \versionadded{1.6} \end{cfuncdesc} \begin{cfuncdesc}{int}{PyObject_CheckReadBuffer}{PyObject *o} Returns \code{1} if \var{o} supports the single-segment readable buffer interface. Otherwise returns \code{0}. + \versionadded{2.2} \enc{cfuncdesc} \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj, - const char **buffer, - int *buffer_len} + const char **buffer, + int *buffer_len} Returns a pointer to a writeable memory location. The \var{obj} argument must support the single-segment, character buffer interface. On success, returns \code{1}, sets \var{buffer} to the memory location and \var{buffer} to the buffer length. Returns \code{0} and sets a \exception{TypeError} on error. + \versionadded{1.6} \end{cfuncdesc} \end{verbatim} |