SIGN IN SIGN UP

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
C
Christopher Thorne committed
ac22f6aa989f18c33c12615af1c66c73cf75d5e7
Parent: 4b5e62d
Committed by Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> on 11/1/2018, 10:48:49 AM