mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
CJK codecs: less magic macros, require explicit semicolon
This commit is contained in:
parent
146a2ed0f2
commit
14c9fea60a
10 changed files with 233 additions and 190 deletions
|
@ -44,14 +44,14 @@ ENCODER(big5hkscs)
|
|||
Py_ssize_t insize;
|
||||
|
||||
if (c < 0x80) {
|
||||
REQUIRE_OUTBUF(1)
|
||||
REQUIRE_OUTBUF(1);
|
||||
**outbuf = (unsigned char)c;
|
||||
NEXT(1, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
insize = 1;
|
||||
REQUIRE_OUTBUF(2)
|
||||
REQUIRE_OUTBUF(2);
|
||||
|
||||
if (c < 0x10000) {
|
||||
if (TRYMAP_ENC(big5hkscs_bmp, code, c)) {
|
||||
|
@ -97,8 +97,8 @@ ENCODER(big5hkscs)
|
|||
else
|
||||
return insize;
|
||||
|
||||
OUTBYTE1(code >> 8)
|
||||
OUTBYTE2(code & 0xFF)
|
||||
OUTBYTE1(code >> 8);
|
||||
OUTBYTE2(code & 0xFF);
|
||||
NEXT(insize, 2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue