diff options
author | Greg Stein <gstein@lyra.org> | 2001-04-07 16:14:49 (GMT) |
---|---|---|
committer | Greg Stein <gstein@lyra.org> | 2001-04-07 16:14:49 (GMT) |
commit | 4d4d0034c0987313ef96fd085f1fd616d96ab4ad (patch) | |
tree | 1d410c9afc00ba660aefa5933948d408f0cfea80 /Doc | |
parent | 76977bbcafd4dd5ac50eed1e8794a338d0fb5841 (diff) | |
download | cpython-4d4d0034c0987313ef96fd085f1fd616d96ab4ad.zip cpython-4d4d0034c0987313ef96fd085f1fd616d96ab4ad.tar.gz cpython-4d4d0034c0987313ef96fd085f1fd616d96ab4ad.tar.bz2 |
Correct the documentation for getreadbufferproc and getwritebufferproc.
Fixes bug #233308 from Travis Oliphant.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/api.tex | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex index 22d0d4b..b07c291 100644 --- a/Doc/api/api.tex +++ b/Doc/api/api.tex @@ -4971,15 +4971,16 @@ Return a pointer to a readable segment of the buffer. This function is allowed to raise an exception, in which case it must return \code{-1}. The \var{segment} which is passed must be zero or positive, and strictly less than the number of segments returned by -the \member{bf_getsegcount} slot function. On success, returns -\code{0} and sets \code{*\var{ptrptr}} to a pointer to the buffer -memory. +the \member{bf_getsegcount} slot function. On success, it returns the +length of the buffer memory, and sets \code{*\var{ptrptr}} to a +pointer to that memory. \end{ctypedesc} \begin{ctypedesc}[getwritebufferproc]{int (*getwritebufferproc) (PyObject *self, int segment, void **ptrptr)} -Return a pointer to a writable memory buffer in \code{*\var{ptrptr}}; -the memory buffer must correspond to buffer segment \var{segment}. +Return a pointer to a writable memory buffer in \code{*\var{ptrptr}}, +and the length of that segment as the function return value. +The memory buffer must correspond to buffer segment \var{segment}. Must return \code{-1} and set an exception on error. \exception{TypeError} should be raised if the object only supports read-only buffers, and \exception{SystemError} should be raised when |