summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/multibytecodec.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-04-11 20:09:04 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-04-11 20:09:04 (GMT)
commita0dd0213cc457bdf2b04206548f5a269db256d4d (patch)
treed282d6b615e9feef64d68fa48cac54e22fd97150 /Modules/cjkcodecs/multibytecodec.h
parentd8a5cc91e6559e11ca28e6a915017433b14b12d1 (diff)
downloadcpython-a0dd0213cc457bdf2b04206548f5a269db256d4d.zip
cpython-a0dd0213cc457bdf2b04206548f5a269db256d4d.tar.gz
cpython-a0dd0213cc457bdf2b04206548f5a269db256d4d.tar.bz2
Close #17693: Rewrite CJK decoders to use the _PyUnicodeWriter API instead of
the legacy Py_UNICODE API. Add also a new _PyUnicodeWriter_WriteChar() function.
Diffstat (limited to 'Modules/cjkcodecs/multibytecodec.h')
-rw-r--r--Modules/cjkcodecs/multibytecodec.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.h b/Modules/cjkcodecs/multibytecodec.h
index 1b6ef55..8e71266 100644
--- a/Modules/cjkcodecs/multibytecodec.h
+++ b/Modules/cjkcodecs/multibytecodec.h
@@ -10,12 +10,6 @@
extern "C" {
#endif
-#ifdef uint32_t
-typedef uint32_t ucs4_t;
-#else
-typedef unsigned int ucs4_t;
-#endif
-
#ifdef uint16_t
typedef uint16_t ucs2_t, DBCHAR;
#else
@@ -27,7 +21,7 @@ typedef union {
int i;
unsigned char c[8];
ucs2_t u2[4];
- ucs4_t u4[2];
+ Py_UCS4 u4[2];
} MultibyteCodec_State;
typedef int (*mbcodec_init)(const void *config);
@@ -44,7 +38,7 @@ typedef Py_ssize_t (*mbencodereset_func)(MultibyteCodec_State *state,
typedef Py_ssize_t (*mbdecode_func)(MultibyteCodec_State *state,
const void *config,
const unsigned char **inbuf, Py_ssize_t inleft,
- Py_UNICODE **outbuf, Py_ssize_t outleft);
+ _PyUnicodeWriter *writer);
typedef int (*mbdecodeinit_func)(MultibyteCodec_State *state,
const void *config);
typedef Py_ssize_t (*mbdecodereset_func)(MultibyteCodec_State *state,