summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorYves Orton <yves.orton@booking.com>2014-01-31 04:43:06 +0800
committerYves Orton <yves.orton@booking.com>2014-01-31 04:43:06 +0800
commit8e1490eec69ee19f7e1c851a5082c201cda30448 (patch)
tree17cf727a805df769db5c26787d098cc304bbf0e8 /regexp.h
parent5e11cd6399d690478e46778b19191fe65f8cf871 (diff)
downloadperl-8e1490eec69ee19f7e1c851a5082c201cda30448.tar.gz
Move the RXf_ANCH flags to intflags as PREGf_ANCH_xxx and add RXf_IS_ANCHORED as a replacement
The only requirement outside of the regex engine is to identify that there is an anchor involved at all. So we move the 4 anchor flags to intflags and replace it with a single aggregate flag RXf_IS_ANCHORED in extflags. This frees up another 3 bits in extflags.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/regexp.h b/regexp.h
index 1368a8a943..a26c4f24f5 100644
--- a/regexp.h
+++ b/regexp.h
@@ -384,16 +384,13 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp)
}
}
-/* Anchor and GPOS related stuff */
-#define RXf_ANCH_BOL (1<<(RXf_BASE_SHIFT+0))
-#define RXf_ANCH_MBOL (1<<(RXf_BASE_SHIFT+1))
-#define RXf_ANCH_SBOL (1<<(RXf_BASE_SHIFT+2))
-#define RXf_ANCH_GPOS (1<<(RXf_BASE_SHIFT+3))
+/* Do we have some sort of anchor? */
+#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+0))
+#define RXf_UNUSED1 (1<<(RXf_BASE_SHIFT+1))
+#define RXf_UNUSED2 (1<<(RXf_BASE_SHIFT+2))
+#define RXf_UNUSED3 (1<<(RXf_BASE_SHIFT+3))
#define RXf_UNUSED4 (1<<(RXf_BASE_SHIFT+4))
#define RXf_UNUSED5 (1<<(RXf_BASE_SHIFT+5))
-/* two bits here */
-#define RXf_ANCH (RXf_ANCH_BOL|RXf_ANCH_MBOL|RXf_ANCH_GPOS|RXf_ANCH_SBOL)
-#define RXf_ANCH_SINGLE (RXf_ANCH_SBOL|RXf_ANCH_GPOS)
/* What we have seen */
#define RXf_NO_INPLACE_SUBST (1<<(RXf_BASE_SHIFT+6))