diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-05 14:13:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-05 14:13:48 +0000 |
commit | f7c278bfa9715e5e699e162924f507b3b71db8fd (patch) | |
tree | 0aaf84a222dcd4a126464cf9bf3fd3c4345f8874 /regexp.h | |
parent | efd26800e76b6f876fd6abe3a3f7e3e4128150a9 (diff) | |
download | perl-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.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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)) |