diff options
author | Christopher Thorne <libcthorne@users.noreply.github.com> | 2018-11-01 10:48:49 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-01 10:48:49 (GMT) |
commit | ac22f6aa989f18c33c12615af1c66c73cf75d5e7 (patch) | |
tree | bb21f3018f9b5e4b40ede33ce78bba1b13980f86 /Misc | |
parent | 4b5e62dbb22a3593e0db266c12f805b727a42b00 (diff) | |
download | cpython-ac22f6aa989f18c33c12615af1c66c73cf75d5e7.zip cpython-ac22f6aa989f18c33c12615af1c66c73cf75d5e7.tar.gz cpython-ac22f6aa989f18c33c12615af1c66c73cf75d5e7.tar.bz2 |
bpo-33578: Add getstate/setstate for CJK codec (GH-6984)
This implements getstate and setstate for the cjkcodecs multibyte incremental encoders/decoders, primarily to fix issues with seek/tell.
The encoder getstate/setstate is slightly tricky as the "state" is pending bytes + MultibyteCodec_State but only an integer can be returned. The approach I've taken is to encode this data into a long, similar to how .tell() encodes a "cookie_type" as a long.
https://bugs.python.org/issue33578
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-06-08-23-55-34.bpo-33578.7oSsjG.rst | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -1626,6 +1626,7 @@ Nicolas M. ThiƩry James Thomas Robin Thomas Brian Thorne +Christopher Thorne Stephen Thorne Jeremy Thurgood Eric Tiedemann diff --git a/Misc/NEWS.d/next/Library/2018-06-08-23-55-34.bpo-33578.7oSsjG.rst b/Misc/NEWS.d/next/Library/2018-06-08-23-55-34.bpo-33578.7oSsjG.rst new file mode 100644 index 0000000..4e2e462 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-06-08-23-55-34.bpo-33578.7oSsjG.rst @@ -0,0 +1 @@ +Implement multibyte encoder/decoder state methods |