summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-01-25 09:15:26 +0100
committerYves Orton <demerphq@gmail.com>2023-03-13 21:26:08 +0800
commitbf0d793b562c409c3aa940e6ffeeabd655dd49e5 (patch)
treef8cc758a9116de62a7017b902ce999d4bda403b0 /dump.c
parentd78630f1ec4da716988da18d97cb6425388e696c (diff)
downloadperl-bf0d793b562c409c3aa940e6ffeeabd655dd49e5.tar.gz
regcomp.c - Use RXp_OFFSp() to access offset data
This insulates access to the regexp match offset data so we can fix the define later and move the offset structure into a new struct. The RXp_OFFSp() was introduced in a recent commit to deliberately break anything using RXp_OFFS() directly. It is hard to type deliberately, nothing but the internals should use it. Everything else should use one of the wrappers around it.
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dump.c b/dump.c
index edbeb182b8..a0b34e15f9 100644
--- a/dump.c
+++ b/dump.c
@@ -2683,8 +2683,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
Perl_dump_indent(aTHX_ level, file, " PPRIVATE = 0x%" UVxf "\n",
PTR2UV(r->pprivate));
Perl_dump_indent(aTHX_ level, file, " OFFS = 0x%" UVxf "\n",
- PTR2UV(r->offs));
- if (r->offs) {
+ PTR2UV(RXp_OFFSp(r)));
+ if (RXp_OFFSp(r)) {
U32 n;
sv_setpvs(d,"[ ");
/* note offs[0] is for the whole match, and
@@ -2692,7 +2692,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
* show one more than we have nparens. */
for(n = 0; n <= r->nparens; n++) {
sv_catpvf(d,"%" IVdf ":%" IVdf "%s",
- (IV)(r->offs[n].start), (IV)(r->offs[n].end),
+ (IV)RXp_OFFSp(r)[n].start, (IV)RXp_OFFSp(r)[n].end,
n+1 > r->nparens ? " ]\n" : ", ");
}
Perl_dump_indent(aTHX_ level, file, " %" SVf, d);