summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.h2
-rw-r--r--op_reg_common.h4
-rw-r--r--regexp.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/op.h b/op.h
index f402d761cc..d00f74ff28 100644
--- a/op.h
+++ b/op.h
@@ -360,7 +360,7 @@ struct pmop {
#define PM_SETRE(o,r) ((o)->op_pmregexp = (r))
#endif
-#define PMf_BASE_SHIFT _RXf_PMf_SHIFT
+#define PMf_BASE_SHIFT ((_RXf_PMf_SHIFT_NEXT)-1)
/* taint $1 etc. if target tainted */
#define PMf_RETAINT (1<<(PMf_BASE_SHIFT+1))
diff --git a/op_reg_common.h b/op_reg_common.h
index b0fd273b3d..de100dc780 100644
--- a/op_reg_common.h
+++ b/op_reg_common.h
@@ -24,4 +24,6 @@
#define RXf_PMf_LOCALE (1 << 5)
#define PMf_LOCALE (1 << 5)
-#define _RXf_PMf_SHIFT 5 /* Begins with '_' so won't be exported by B */
+/* Next available bit after the above. Name begins with '_' so won't be
+ * exported by B */
+#define _RXf_PMf_SHIFT_NEXT 6
diff --git a/regexp.h b/regexp.h
index ec897881e3..5246c1231e 100644
--- a/regexp.h
+++ b/regexp.h
@@ -291,7 +291,7 @@ and check for NULL.
*
*/
-#define RXf_BASE_SHIFT _RXf_PMf_SHIFT
+#define RXf_BASE_SHIFT ((_RXf_PMf_SHIFT_NEXT)-1)
/* Anchor and GPOS related stuff */
#define RXf_ANCH_BOL (1<<(RXf_BASE_SHIFT+3))