This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
autodie 2.06_01
[perl5.git] / utf8.h
diff --git a/utf8.h b/utf8.h
index f9f1bec..659319e 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -1,6 +1,6 @@
 /*    utf8.h
  *
- *    Copyright (C) 2000, 2001, 2002, 2005, 2006, 2007, by Larry Wall and others
+ *    Copyright (C) 2000, 2001, 2002, 2005, 2006, 2007, 2009 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -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