summaryrefslogtreecommitdiffstats
path: root/Doc/api
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2005-10-06 20:29:57 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2005-10-06 20:29:57 (GMT)
commitd1c1e10f70212464415fdf2ab0bed4b5d32fdf32 (patch)
tree82db5a596a24d75e3caf0cd8054e2a68fe837332 /Doc/api
parent331649acc7479f6e10cf6f6d01118d90f58ae600 (diff)
downloadcpython-d1c1e10f70212464415fdf2ab0bed4b5d32fdf32.zip
cpython-d1c1e10f70212464415fdf2ab0bed4b5d32fdf32.tar.gz
cpython-d1c1e10f70212464415fdf2ab0bed4b5d32fdf32.tar.bz2
Part of SF patch #1313939: Speedup charmap decoding by extending
PyUnicode_DecodeCharmap() the accept a unicode string as the mapping argument which is used as a mapping table. This code isn't used by any of the codecs yet.
Diffstat (limited to 'Doc/api')
-rw-r--r--Doc/api/concrete.tex7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex
index b6dbc5d..53c3b67 100644
--- a/Doc/api/concrete.tex
+++ b/Doc/api/concrete.tex
@@ -1322,7 +1322,12 @@ points.
const char *errors}
Create a Unicode object by decoding \var{size} bytes of the encoded
string \var{s} using the given \var{mapping} object. Return
- \NULL{} if an exception was raised by the codec.
+ \NULL{} if an exception was raised by the codec. If \var{mapping} is \NULL{}
+ latin-1 decoding will be done. Else it can be a dictionary mapping byte or a
+ unicode string, which is treated as a lookup table. Byte values greater
+ that the length of the string and U+FFFE "characters" are treated as
+ "undefined mapping".
+ \versionchanged[Allowed unicode string as mapping argument]{2.4}
\end{cfuncdesc}
\begin{cfuncdesc}{PyObject*}{PyUnicode_EncodeCharmap}{const Py_UNICODE *s,