summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-20 23:31:27 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-20 23:31:27 (GMT)
commit5087980c1e7e6733983245cd0f209d8770f9686e (patch)
tree21cb48e04503c87abd856791ba2a249a40ff1433 /Include
parent8c4592a77ae6b71a4bab8d40bbdcea72a6378cb4 (diff)
downloadcpython-5087980c1e7e6733983245cd0f209d8770f9686e.zip
cpython-5087980c1e7e6733983245cd0f209d8770f9686e.tar.gz
cpython-5087980c1e7e6733983245cd0f209d8770f9686e.tar.bz2
The incremental decoder for utf-7 must preserve its state between calls.
Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py.
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 3e9dcee..a774d52 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -674,6 +674,13 @@ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF7(
const char *errors /* error handling */
);
+PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF7Stateful(
+ const char *string, /* UTF-7 encoded string */
+ Py_ssize_t length, /* size of string */
+ const char *errors, /* error handling */
+ Py_ssize_t *consumed /* bytes consumed */
+ );
+
PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF7(
const Py_UNICODE *data, /* Unicode char buffer */
Py_ssize_t length, /* number of Py_UNICODE chars to encode */