summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 14:13:48 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 14:13:48 +0000
commitf7c278bfa9715e5e699e162924f507b3b71db8fd (patch)
tree0aaf84a222dcd4a126464cf9bf3fd3c4345f8874 /regexp.h
parentefd26800e76b6f876fd6abe3a3f7e3e4128150a9 (diff)
downloadperl-f7c278bfa9715e5e699e162924f507b3b71db8fd.tar.gz
Abolish wrapped in struct regexp - store the wrapped pattern pointer
in the SvPVX(). p4raw-id: //depot/perl@32841
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/regexp.h b/regexp.h
index f76a8eafff..fd2431a80e 100644
--- a/regexp.h
+++ b/regexp.h
@@ -100,8 +100,6 @@ typedef struct regexp {
/* Information about the match that isn't often used */
- /* wrapped can't be const char*, as it is returned by sv_2pv_flags */
- char *wrapped; /* wrapped version of the pattern */
I32 wraplen; /* length of wrapped */
unsigned pre_prefix:4; /* offset from wrapped to the start of precomp */
unsigned seen_evals:28; /* number of eval groups in the pattern - for security checks */
@@ -366,9 +364,9 @@ and check for NULL.
#define RXp_EXTFLAGS(rx) ((rx)->extflags)
/* For source compatibility. We used to store these explicitly. */
-#define RX_PRECOMP(prog) (((struct regexp *)SvANY(prog))->wrapped + ((struct regexp *)SvANY(prog))->pre_prefix)
+#define RX_PRECOMP(prog) (RX_WRAPPED(prog) + ((struct regexp *)SvANY(prog))->pre_prefix)
#define RX_PRELEN(prog) RXp_PRELEN((struct regexp *)SvANY(prog))
-#define RX_WRAPPED(prog) (((struct regexp *)SvANY(prog))->wrapped)
+#define RX_WRAPPED(prog) SvPVX(prog)
#define RX_WRAPLEN(prog) RXp_WRAPLEN((struct regexp *)SvANY(prog))
#define RX_CHECK_SUBSTR(prog) (((struct regexp *)SvANY(prog))->check_substr)
#define RX_EXTFLAGS(prog) RXp_EXTFLAGS((struct regexp *)SvANY(prog))