[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.117.2.12,1.117.2.13
Fred L. Drake
fdrake@users.sourceforge.net
Wed, 03 Apr 2002 20:21:25 -0800
Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv15075/api
Modified Files:
Tag: release21-maint
api.tex
Log Message:
Add the PyObject_As*Buffer() functions that apply, now that the docs have been
corrected and I'm dealing with them anyway.
Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.117.2.12
retrieving revision 1.117.2.13
diff -C2 -d -r1.117.2.12 -r1.117.2.13
*** api.tex 12 Mar 2002 20:18:01 -0000 1.117.2.12
--- api.tex 4 Apr 2002 04:21:23 -0000 1.117.2.13
***************
*** 2118,2121 ****
--- 2118,2158 ----
+ \section{Buffer Protocol \label{abstract-buffer}}
+
+ \begin{cfuncdesc}{int}{PyObject_AsCharBuffer}{PyObject *obj,
+ 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{0}, sets
+ \var{buffer} to the memory location and \var{buffer_len} to the buffer
+ length. Returns \code{-1} 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}
+ 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{0}, sets \var{buffer} to the memory location and \var{buffer_len}
+ to the buffer length. Returns \code{-1} and sets a
+ \exception{TypeError} on error.
+ \versionadded{1.6}
+ \end{cfuncdesc}
+
+ \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
+ 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{0}, sets \var{buffer} to the
+ memory location and \var{buffer_len} to the buffer length. Returns
+ \code{-1} and sets a \exception{TypeError} on error.
+ \versionadded{1.6}
+ \end{cfuncdesc}
+
+
\chapter{Concrete Objects Layer \label{concrete}}