mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
CJK codecs: use less magic and more readable macros, write explicit if
This commit is contained in:
parent
0a6e2c59d3
commit
bd97ac35f7
7 changed files with 32 additions and 34 deletions
|
@ -29,7 +29,7 @@ ENCODER(big5)
|
|||
|
||||
REQUIRE_OUTBUF(2)
|
||||
|
||||
TRYMAP_ENC(big5, code, c);
|
||||
if (TRYMAP_ENC(big5, code, c));
|
||||
else return 1;
|
||||
|
||||
OUTBYTE1(code >> 8)
|
||||
|
@ -84,8 +84,8 @@ ENCODER(cp950)
|
|||
return 1;
|
||||
|
||||
REQUIRE_OUTBUF(2)
|
||||
TRYMAP_ENC(cp950ext, code, c);
|
||||
else TRYMAP_ENC(big5, code, c);
|
||||
if (TRYMAP_ENC(cp950ext, code, c));
|
||||
else if (TRYMAP_ENC(big5, code, c));
|
||||
else return 1;
|
||||
|
||||
OUTBYTE1(code >> 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue