summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-28 21:25:50 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-28 21:25:50 +0000
commit220fc49f9cd19ab777a22ef733671f0fbb81e6bd (patch)
treea91eae57fc34523216a9770d4b54a1f88987826b /pp_ctl.c
parentf19b4ba939a9fcdd83b091f4baa1c12b87ff9886 (diff)
downloadperl-220fc49f9cd19ab777a22ef733671f0fbb81e6bd.tar.gz
Wrap all accesses to the members precomp and prelen of struct regexp in
the macros RX_PRECOMP() and RX_PRELEN(). This will allow us to reduce the regexp storage overhead by computing them at retrieve time. p4raw-id: //depot/perl@32753
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 2ce3a978cf..5cbfd0613f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -130,8 +130,8 @@ PP(pp_regcomp)
re = PM_GETRE(pm);
/* Check against the last compiled regexp. */
- if (!re || !re->precomp || re->prelen != (I32)len ||
- memNE(re->precomp, t, len))
+ if (!re || !RX_PRECOMP(re) || RX_PRELEN(re) != (I32)len ||
+ memNE(RX_PRECOMP(re), t, len))
{
const regexp_engine *eng = re ? re->engine : NULL;
U32 pm_flags = pm->op_pmflags & PMf_COMPILETIME;
@@ -172,7 +172,7 @@ PP(pp_regcomp)
}
#endif
- if (!PM_GETRE(pm)->prelen && PL_curpm)
+ if (!RX_PRELEN(PM_GETRE(pm)) && PL_curpm)
pm = PL_curpm;