summaryrefslogtreecommitdiff
path: root/op_reg_common.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-05-29 14:25:19 -0600
committerKarl Williamson <khw@cpan.org>2020-07-17 22:04:08 -0600
commitd223e1ea9ae864c0e563187f1e76240ef1acad87 (patch)
treef670961d58ff3c055cff40637ca9daacaf1b462e /op_reg_common.h
parent0654f0ab17405d0d55f0006348b4ed0084aa1fc8 (diff)
downloadperl-d223e1ea9ae864c0e563187f1e76240ef1acad87.tar.gz
handy.h: Create nBIT_MASK(n) macro
This encapsulates a common paradigm, making sure that it is done correctly for the platform's size.
Diffstat (limited to 'op_reg_common.h')
-rw-r--r--op_reg_common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/op_reg_common.h b/op_reg_common.h
index c500aa4180..e8770e6352 100644
--- a/op_reg_common.h
+++ b/op_reg_common.h
@@ -137,8 +137,8 @@ get_regex_charset(const U32 flags)
* directly in the #define because doing so confuses regcomp.pl.
* (2**n - 1) is n 1 bits, so the below gets the contiguous bits between the
* beginning and ending shifts */
-#if RXf_PMf_COMPILETIME != (((1 << (_RXf_PMf_SHIFT_COMPILETIME))-1) \
- & (~((1 << RXf_PMf_STD_PMMOD_SHIFT)-1)))
+#if RXf_PMf_COMPILETIME != ((nBIT_MASK(_RXf_PMf_SHIFT_COMPILETIME)) \
+ & (~(nBIT_MASK( RXf_PMf_STD_PMMOD_SHIFT))))
# error RXf_PMf_COMPILETIME is invalid
#endif