summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:54:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:54:51 +0000
commit7df053ec69e901392ae6352566832be0a6917cfe (patch)
tree172b7acc956020f4272986101fa9ce5773a0db48 /utf8.h
parentc512ce4f7f4a9bd0f491f91cb5a15fcb65ee37d9 (diff)
downloadperl-7df053ec69e901392ae6352566832be0a6917cfe.tar.gz
(Retracted by #8264) More join() testing which was good because
it revealed a bug in #8248 (the UTF8_EIGHT_BIT_LO() was wrong). p4raw-id: //depot/perl@8249
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/utf8.h b/utf8.h
index e9598b8759..8d46aa9dfa 100644
--- a/utf8.h
+++ b/utf8.h
@@ -69,10 +69,10 @@ END_EXTERN_C
#define UTF8_CONTINUATION_MASK ((U8)0x3f)
#define UTF8_ACCUMULATION_SHIFT 6
-#define UTF8_ACCUMULATE(old, new) ((old) << UTF8_ACCUMULATION_SHIFT | ((new) & UTF8_CONTINUATION_MASK))
+#define UTF8_ACCUMULATE(old, new) ((old) << UTF8_ACCUMULATION_SHIFT | (((U8)new) & UTF8_CONTINUATION_MASK))
-#define UTF8_EIGHT_BIT_HI(c) ( (((U8)c)>>6) |0xc0)
-#define UTF8_EIGHT_BIT_LO(c) (((((U8)c)>>6)&0x3f)|0x80)
+#define UTF8_EIGHT_BIT_HI(c) ( (((U8)(c))>>6) |0xc0)
+#define UTF8_EIGHT_BIT_LO(c) (((((U8)(c)) )&0x3f)|0x80)
#ifdef HAS_QUAD
#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \