summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-02-01 22:52:13 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-02-01 22:52:33 +0100
commit22901f3092e7c5e351ab76b58f47dc595d022343 (patch)
tree4be3c3f6beca66dedd4d50f65f5a01f715ecbfe6 /utf8.h
parentcbbb00c6b54a037bd5a2a10e54e58dc59af54a94 (diff)
downloadperl-22901f3092e7c5e351ab76b58f47dc595d022343.tar.gz
Put parentheses around macro arguments
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.h b/utf8.h
index 0b3dc6a826..659319e82d 100644
--- a/utf8.h
+++ b/utf8.h
@@ -118,8 +118,8 @@ encoded character.
#define UTF8_IS_CONTINUED(c) (((U8)c) & 0x80)
#define UTF8_IS_DOWNGRADEABLE_START(c) (((U8)c & 0xfc) == 0xc0)
-#define UTF_START_MARK(len) ((len > 7) ? 0xFF : (0xFE << (7-len)))
-#define UTF_START_MASK(len) ((len >= 7) ? 0x00 : (0x1F >> (len-2)))
+#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : (0xFE << (7-(len))))
+#define UTF_START_MASK(len) (((len) >= 7) ? 0x00 : (0x1F >> ((len)-2)))
#define UTF_CONTINUATION_MARK 0x80
#define UTF_ACCUMULATION_SHIFT 6