summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/_codecs_hk.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-10-28 22:54:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-10-28 22:54:13 (GMT)
commitbd97ac35f7cab6229243e2c93b6fa6eaf7f0cc19 (patch)
tree65a872a6465d226a833445ce4a5f46ea6d363949 /Modules/cjkcodecs/_codecs_hk.c
parent0a6e2c59d362659001adfb232537f9af5fdb256c (diff)
downloadcpython-bd97ac35f7cab6229243e2c93b6fa6eaf7f0cc19.zip
cpython-bd97ac35f7cab6229243e2c93b6fa6eaf7f0cc19.tar.gz
cpython-bd97ac35f7cab6229243e2c93b6fa6eaf7f0cc19.tar.bz2
CJK codecs: use less magic and more readable macros, write explicit if
Diffstat (limited to 'Modules/cjkcodecs/_codecs_hk.c')
-rw-r--r--Modules/cjkcodecs/_codecs_hk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/cjkcodecs/_codecs_hk.c b/Modules/cjkcodecs/_codecs_hk.c
index cc7627a..825772e 100644
--- a/Modules/cjkcodecs/_codecs_hk.c
+++ b/Modules/cjkcodecs/_codecs_hk.c
@@ -54,7 +54,7 @@ ENCODER(big5hkscs)
REQUIRE_OUTBUF(2)
if (c < 0x10000) {
- TRYMAP_ENC(big5hkscs_bmp, code, c) {
+ if (TRYMAP_ENC(big5hkscs_bmp, code, c)) {
if (code == MULTIC) {
Py_UCS4 c2;
if (inlen - *inpos >= 2)
@@ -81,13 +81,13 @@ ENCODER(big5hkscs)
}
}
}
- else TRYMAP_ENC(big5, code, c);
+ else if (TRYMAP_ENC(big5, code, c));
else return 1;
}
else if (c < 0x20000)
return insize;
else if (c < 0x30000) {
- TRYMAP_ENC(big5hkscs_nonbmp, code, c & 0xffff);
+ if (TRYMAP_ENC(big5hkscs_nonbmp, code, c & 0xffff));
else return insize;
}
else