@@ -895,9 +895,9 @@ \section{Buffer Protocol \label{abstract-buffer}}
895895 int *buffer_len}
896896 Returns a pointer to a read-only memory location useable as character-
897897 based input. The \var {obj} argument must support the single-segment
898- character buffer interface. On success, returns \code {1 }, sets
898+ character buffer interface. On success, returns \code {0 }, sets
899899 \var {buffer} to the memory location and \var {buffer_len} to the buffer
900- length. Returns \code {0 } and sets a \exception {TypeError} on error.
900+ length. Returns \code {-1 } and sets a \exception {TypeError} on error.
901901 \versionadded {1.6}
902902\end {cfuncdesc }
903903
@@ -907,8 +907,8 @@ \section{Buffer Protocol \label{abstract-buffer}}
907907 Returns a pointer to a read-only memory location containing
908908 arbitrary data. The \var {obj} argument must support the
909909 single-segment readable buffer interface. On success, returns
910- \code {1 }, sets \var {buffer} to the memory location and \var {buffer_len}
911- to the buffer length. Returns \code {0 } and sets a
910+ \code {0 }, sets \var {buffer} to the memory location and \var {buffer_len}
911+ to the buffer length. Returns \code {-1 } and sets a
912912 \exception {TypeError} on error.
913913 \versionadded {1.6}
914914\end {cfuncdesc }
@@ -924,8 +924,8 @@ \section{Buffer Protocol \label{abstract-buffer}}
924924 int *buffer_len}
925925 Returns a pointer to a writeable memory location. The \var {obj}
926926 argument must support the single-segment, character buffer
927- interface. On success, returns \code {1 }, sets \var {buffer} to the
927+ interface. On success, returns \code {0 }, sets \var {buffer} to the
928928 memory location and \var {buffer_len} to the buffer length. Returns
929- \code {0 } and sets a \exception {TypeError} on error.
929+ \code {-1 } and sets a \exception {TypeError} on error.
930930 \versionadded {1.6}
931931\end {cfuncdesc }
0 commit comments