summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/unicode.rst
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-04 03:38:46 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-04 03:38:46 (GMT)
commit942af5a9a45b7b4976bea2e794eccaaf2b3b5c09 (patch)
treef621bdffa16dd0b04d7bf60d6a32f198fc7b3ec8 /Doc/c-api/unicode.rst
parent36526bf3d95763afa6d4efe402b8840b1532d637 (diff)
downloadcpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.zip
cpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.tar.gz
cpython-942af5a9a45b7b4976bea2e794eccaaf2b3b5c09.tar.bz2
Issue #10557: Fixed error messages from float() and other numeric
types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents.
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r--Doc/c-api/unicode.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 4530422..9edbcbb 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -328,6 +328,13 @@ APIs:
Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two
arguments.
+.. c:function:: PyObject* PyUnicode_TransformDecimalToASCII(Py_UNICODE *s, Py_ssize_t size)
+
+ Create a Unicode object by replacing all decimal digits in
+ :c:type:`Py_UNICODE` buffer of the given size by ASCII digits 0--9
+ according to their decimal value. Return *NULL* if an exception
+ occurs.
+
.. c:function:: Py_UNICODE* PyUnicode_AsUnicode(PyObject *unicode)