summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorRichard Soderberg <p5-authors@crystalflame.net>2001-06-21 00:01:22 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-21 13:12:54 +0000
commitaaa362c4c9a4b61a85f6a240dc8826e53958f6da (patch)
tree07d118556847421b720394f89d0c87824892ffac /mg.c
parent4c8a4e58b37238aa7f23df050ac909444f7e45a6 (diff)
downloadperl-aaa362c4c9a4b61a85f6a240dc8826e53958f6da.tar.gz
Step 2: Use the new PM_GETRE/SETRE macros everywhere.
Message-ID: <Pine.LNX.4.21.0106210657400.1693-100000@oregonnet.com> p4raw-id: //depot/perl@10780
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mg.c b/mg.c
index 7230b0151d..0cf8228099 100644
--- a/mg.c
+++ b/mg.c
@@ -341,7 +341,7 @@ Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg)
{
register REGEXP *rx;
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
if (mg->mg_obj) /* @+ */
return rx->nparens;
else /* @- */
@@ -360,7 +360,7 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg)
register REGEXP *rx;
I32 t;
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
paren = mg->mg_len;
if (paren < 0)
return 0;
@@ -404,7 +404,7 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg)
switch (*mg->mg_ptr) {
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': case '&':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
paren = atoi(mg->mg_ptr); /* $& is in [0] */
getparen:
@@ -429,14 +429,14 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg)
}
return 0;
case '+':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
paren = rx->lastparen;
if (paren)
goto getparen;
}
return 0;
case '`':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
if (rx->startp[0] != -1) {
i = rx->startp[0];
if (i > 0) {
@@ -448,7 +448,7 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg)
}
return 0;
case '\'':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
if (rx->endp[0] != -1) {
i = rx->sublen - rx->endp[0];
if (i > 0) {
@@ -614,7 +614,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
break;
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': case '&':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
I32 s1, t1;
/*
@@ -653,7 +653,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setsv(sv,&PL_sv_undef);
break;
case '+':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
paren = rx->lastparen;
if (paren)
goto getparen;
@@ -661,7 +661,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setsv(sv,&PL_sv_undef);
break;
case '`':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
if ((s = rx->subbeg) && rx->startp[0] != -1) {
i = rx->startp[0];
goto getrx;
@@ -670,7 +670,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setsv(sv,&PL_sv_undef);
break;
case '\'':
- if (PL_curpm && (rx = PL_curpm->op_pmregexp)) {
+ if (PL_curpm && (rx = PM_GETRE(PL_curpm))) {
if (rx->subbeg && rx->endp[0] != -1) {
s = rx->subbeg + rx->endp[0];
i = rx->sublen - rx->endp[0];