summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 14:43:55 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 14:43:55 +0000
commit5509d87acdf3aa5ea39fe6c8e59a42b46a5141cd (patch)
treeb0316cd65a1103e812aebe0a973d29dbc40a839e /regexp.h
parent08f18727250f262830d3b2860052d5b5e6083051 (diff)
downloadperl-5509d87acdf3aa5ea39fe6c8e59a42b46a5141cd.tar.gz
Abolish RXp_PRELEN(rx) and RXp_WRAPLEN()
Fix up some uses of RX_* macros in the block conditionally compiled with STUPID_PATTERN_CHECKS. p4raw-id: //depot/perl@32843
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/regexp.h b/regexp.h
index fd2431a80e..bae20d5ce2 100644
--- a/regexp.h
+++ b/regexp.h
@@ -356,18 +356,16 @@ and check for NULL.
? RX_MATCH_COPIED_on(prog) \
: RX_MATCH_COPIED_off(prog))
-/* FIXME? Are we hardcoding too much here and constraining plugin extension
- writers? Specifically, the value 1 assumes that the wrapped version always
- has exactly one character at the end, a ')'. Will that always be true? */
-#define RXp_PRELEN(rx) ((rx)->wraplen - (rx)->pre_prefix - 1)
-#define RXp_WRAPLEN(rx) ((rx)->wraplen)
#define RXp_EXTFLAGS(rx) ((rx)->extflags)
/* For source compatibility. We used to store these explicitly. */
#define RX_PRECOMP(prog) (RX_WRAPPED(prog) + ((struct regexp *)SvANY(prog))->pre_prefix)
-#define RX_PRELEN(prog) RXp_PRELEN((struct regexp *)SvANY(prog))
+/* FIXME? Are we hardcoding too much here and constraining plugin extension
+ writers? Specifically, the value 1 assumes that the wrapped version always
+ has exactly one character at the end, a ')'. Will that always be true? */
+#define RX_PRELEN(prog) (RX_WRAPLEN(prog) - ((struct regexp *)SvANY(prog))->pre_prefix - 1)
#define RX_WRAPPED(prog) SvPVX(prog)
-#define RX_WRAPLEN(prog) RXp_WRAPLEN((struct regexp *)SvANY(prog))
+#define RX_WRAPLEN(prog) (((struct regexp *)SvANY(prog))->wraplen)
#define RX_CHECK_SUBSTR(prog) (((struct regexp *)SvANY(prog))->check_substr)
#define RX_EXTFLAGS(prog) RXp_EXTFLAGS((struct regexp *)SvANY(prog))
#define RX_REFCNT(prog) SvREFCNT(prog)