diff options
author | Fred Drake <fdrake@acm.org> | 1999-08-27 15:28:15 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-08-27 15:28:15 (GMT) |
commit | 8779f648d2958b5aebade3f94464c092c501bf87 (patch) | |
tree | db931528f27bab7b5bec8d2baf6e2362ac124b56 | |
parent | 7f1fdfcdaf44563a230b20fbed600513e6ec2cf2 (diff) | |
download | cpython-8779f648d2958b5aebade3f94464c092c501bf87.zip cpython-8779f648d2958b5aebade3f94464c092c501bf87.tar.gz cpython-8779f648d2958b5aebade3f94464c092c501bf87.tar.bz2 |
Added descriptions of the t#, w, and w# PyArg_ParseTuple() format
characters; these are the ones for the buffer interface.
-rw-r--r-- | Doc/ext/ext.tex | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index 04ffcbf..2572b58 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -708,6 +708,27 @@ Like \samp{O} but requires that the Python object is a string object. Raises a \exception{TypeError} exception if the object is not a string object. The C variable may also be declared as \ctype{PyObject *}. +\item[\samp{t\#} (read-only character buffer) {[char *, int]}] +Like \samp{s\#}, but accepts any object which implements the read-only +buffer interface. The \ctype{char *} variable is set to point to the +first byte of the buffer, and the \ctype{int} is set to the length of +the buffer. Only single-segment buffer objects are accepted; +\exception{TypeError} is raised for all others. + +\item[\samp{w} (read-write character buffer) {[char *]}] +Similar to \samp{s}, but accepts any object which implements the +read-write buffer interface. The caller must determine the length of +the buffer by other means, or use \samp{w\#} instead. Only +single-segment buffer objects are accepted; \exception{TypeError} is +raised for all others. + +\item[\samp{w\#} (read-write character buffer) {[char *, int]}] +Like \samp{s\#}, but accepts any object which implements the +read-write buffer interface. The \ctype{char *} variable is set to +point to the first byte of the buffer, and the \ctype{int} is set to +the length of the buffer. Only single-segment buffer objects are +accepted; \exception{TypeError} is raised for all others. + \item[\samp{(\var{items})} (tuple) {[\var{matching-items}]}] The object must be a Python sequence whose length is the number of format units in \var{items}. The C arguments must correspond to the |