summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-09-21 21:08:08 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-09-21 21:08:08 (GMT)
commit3578b77312720061ef3e5a86e3db4f3c968edf56 (patch)
tree2022a0ef31308131e30604085452b25bab79972d /Doc
parent265a804af22d2513403c295d9218ba41753ca218 (diff)
downloadcpython-3578b77312720061ef3e5a86e3db4f3c968edf56.zip
cpython-3578b77312720061ef3e5a86e3db4f3c968edf56.tar.gz
cpython-3578b77312720061ef3e5a86e3db4f3c968edf56.tar.bz2
Special case the "s#" PyArg_Parse() token for Unicode objects:
"s#" will now return a pointer to the default encoded string data of the Unicode object instead of a pointer to the raw UTF-16 data. The latter is still available via PyObject_AsReadBuffer().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ext/ext.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex
index d54b78c..38215fa 100644
--- a/Doc/ext/ext.tex
+++ b/Doc/ext/ext.tex
@@ -692,10 +692,10 @@ raised.
This variant on \samp{s} stores into two C variables, the first one a
pointer to a character string, the second one its length. In this
case the Python string may contain embedded null bytes. Unicode
-objects and all other read buffer compatible objects pass back a
-reference to the raw internal data representation. In case of Unicode
-objects the pointer points to a null-terminated buffer of 16-bit
-Py_UNICODE (UTF-16) data.
+objects pass back a pointer to the default encoded string version of the
+object if such a conversion is possible. All other read buffer
+compatible objects pass back a reference to the raw internal data
+representation.
\item[\samp{z} (string or \code{None}) {[char *]}]
Like \samp{s}, but the Python object may also be \code{None}, in which