summaryrefslogtreecommitdiff
path: root/op_reg_common.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-09-29 12:41:42 -0600
committerKarl Williamson <khw@cpan.org>2014-10-06 22:34:49 -0600
commit7641d82ce3e972a211dd70006d3a88edc8a920d9 (patch)
treeaf772b3b6612034a48bb8bb55d1f5cb9bb18431e /op_reg_common.h
parent7741ceede2c8b7d40e88e361d1264a11871aeb83 (diff)
downloadperl-7641d82ce3e972a211dd70006d3a88edc8a920d9.tar.gz
op_reg_common.h: Nits
Add missing U suffix to unsigned numeric constant; parenthesize macro expansions for safety.
Diffstat (limited to 'op_reg_common.h')
-rw-r--r--op_reg_common.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/op_reg_common.h b/op_reg_common.h
index bdb2267328..c3f3e7fefc 100644
--- a/op_reg_common.h
+++ b/op_reg_common.h
@@ -50,7 +50,7 @@ typedef enum {
} regex_charset;
#define _RXf_PMf_CHARSET_SHIFT ((RXf_PMf_STD_PMMOD_SHIFT)+6)
-#define RXf_PMf_CHARSET (7 << (_RXf_PMf_CHARSET_SHIFT)) /* 3 bits */
+#define RXf_PMf_CHARSET (7U << (_RXf_PMf_CHARSET_SHIFT)) /* 3 bits */
/* Manually decorate these functions here with gcc-style attributes just to
* avoid making the regex_charset typedef global, which it would need to be for
@@ -110,14 +110,14 @@ get_regex_charset(const U32 flags)
/* These copies need to be numerical or ext/B/Makefile.PL won't think they are
* constants */
-#define PMf_MULTILINE 1U<<0
-#define PMf_SINGLELINE 1U<<1
-#define PMf_FOLD 1U<<2
-#define PMf_EXTENDED 1U<<3
-#define PMf_EXTENDED_MORE 1U<<4
-#define PMf_KEEPCOPY 1U<<5
-#define PMf_CHARSET 7U<<6
-#define PMf_SPLIT 1U<<9
+#define PMf_MULTILINE (1U<<0)
+#define PMf_SINGLELINE (1U<<1)
+#define PMf_FOLD (1U<<2)
+#define PMf_EXTENDED (1U<<3)
+#define PMf_EXTENDED_MORE (1U<<4)
+#define PMf_KEEPCOPY (1U<<5)
+#define PMf_CHARSET (7U<<6)
+#define PMf_SPLIT (1U<<9)
#if PMf_MULTILINE != RXf_PMf_MULTILINE || PMf_SINGLELINE != RXf_PMf_SINGLELINE || PMf_FOLD != RXf_PMf_FOLD || PMf_EXTENDED != RXf_PMf_EXTENDED || PMf_EXTENDED_MORE != RXf_PMf_EXTENDED_MORE || PMf_KEEPCOPY != RXf_PMf_KEEPCOPY || PMf_SPLIT != RXf_PMf_SPLIT || PMf_CHARSET != RXf_PMf_CHARSET
# error RXf_PMf defines are wrong