summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-02 12:06:05 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-02 12:06:05 +0000
commit07bc277f32c1d7aff237dd3f55d558b5d4b93314 (patch)
tree86a4a36156c095e618d07cc5cb6d35875496d75f /dump.c
parent3d66076ad00dfe06380fb774b92fb59dc07fe4ec (diff)
downloadperl-07bc277f32c1d7aff237dd3f55d558b5d4b93314.tar.gz
Wrap all deferences of struct regexp* in macros RX_*() [and for
regcomp.c and regexec.c RXp_* where necessary] so that in future we can maintain source compatibility when we add an extra level of dereferencing. p4raw-id: //depot/perl@32802
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/dump.c b/dump.c
index 126fe89010..9010c6557e 100644
--- a/dump.c
+++ b/dump.c
@@ -552,7 +552,7 @@ Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, const PMOP *pm)
Perl_dump_indent(aTHX_ level, file, "PMf_REPL = ");
op_dump(pm->op_pmreplrootu.op_pmreplroot);
}
- if (pm->op_pmflags || (PM_GETRE(pm) && PM_GETRE(pm)->check_substr)) {
+ if (pm->op_pmflags || (PM_GETRE(pm) && RX_CHECK_SUBSTR(PM_GETRE(pm)))) {
SV * const tmpsv = pm_description(pm);
Perl_dump_indent(aTHX_ level, file, "PMFLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX_const(tmpsv) + 1 : "");
SvREFCNT_dec(tmpsv);
@@ -579,15 +579,15 @@ S_pm_description(pTHX_ const PMOP *pm)
#endif
if (regex) {
- if (regex->extflags & RXf_TAINTED)
+ if (RX_EXTFLAGS(regex) & RXf_TAINTED)
sv_catpv(desc, ",TAINTED");
- if (regex->check_substr) {
- if (!(regex->extflags & RXf_NOSCAN))
+ if (RX_CHECK_SUBSTR(regex)) {
+ if (!(RX_EXTFLAGS(regex) & RXf_NOSCAN))
sv_catpv(desc, ",SCANFIRST");
- if (regex->extflags & RXf_CHECK_ALL)
+ if (RX_EXTFLAGS(regex) & RXf_CHECK_ALL)
sv_catpv(desc, ",ALL");
}
- if (regex->extflags & RXf_SKIPWHITE)
+ if (RX_EXTFLAGS(regex) & RXf_SKIPWHITE)
sv_catpv(desc, ",SKIPWHITE");
}
@@ -1283,17 +1283,17 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC *mg, I32 nest, I32
Perl_dump_indent(aTHX_ level, file, " MG_OBJ = 0x%"UVxf"\n",
PTR2UV(mg->mg_obj));
if (mg->mg_type == PERL_MAGIC_qr) {
- const regexp * const re = (regexp *)mg->mg_obj;
+ REGEXP* const re = (REGEXP *)mg->mg_obj;
SV * const dsv = sv_newmortal();
const char * const s
= pv_pretty(dsv, RX_WRAPPED(re), RX_WRAPLEN(re),
60, NULL, NULL,
( PERL_PV_PRETTY_QUOTE | PERL_PV_ESCAPE_RE | PERL_PV_PRETTY_ELLIPSES |
- ((re->extflags & RXf_UTF8) ? PERL_PV_ESCAPE_UNI : 0))
+ ((RX_EXTFLAGS(re) & RXf_UTF8) ? PERL_PV_ESCAPE_UNI : 0))
);
Perl_dump_indent(aTHX_ level+1, file, " PAT = %s\n", s);
Perl_dump_indent(aTHX_ level+1, file, " REFCNT = %"IVdf"\n",
- (IV)re->refcnt);
+ (IV)RX_REFCNT(re));
}
if (mg->mg_flags & MGf_REFCOUNTED)
do_sv_dump(level+2, file, mg->mg_obj, nest+1, maxnest, dumpops, pvlim); /* MG is already +1 */