summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-30 23:22:31 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-30 23:22:31 +0000
commitad64d0ecd555e97c5a216efca1ec5a96b7fd0b34 (patch)
treef9ac4da2522a36d77b09d165b4cb1d4e43d5b4f4 /regexec.c
parentb3dbd76e6e180b608015c6158c3fec9739ef1343 (diff)
downloadperl-ad64d0ecd555e97c5a216efca1ec5a96b7fd0b34.tar.gz
Eliminate (SV *) casts from the rest of *.c, picking up one (further)
erroneous const in dump.c. p4raw-id: //depot/perl@34675
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/regexec.c b/regexec.c
index 008e637df4..0c4329dda3 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2681,7 +2681,7 @@ S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan)
{
I32 n;
RXi_GET_DECL(rex,rexi);
- SV *sv_dat=(SV*)rexi->data->data[ ARG( scan ) ];
+ SV *sv_dat= MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
I32 *nums=(I32*)SvPVX(sv_dat);
PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED;
@@ -3797,7 +3797,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
/* This isn't a first class regexp. Instead, it's
caching a regexp onto an existing, Perl visible
scalar. */
- sv_magic(ret, (SV*) rx, PERL_MAGIC_qr, 0, 0);
+ sv_magic(ret, MUTABLE_SV(rx), PERL_MAGIC_qr, 0, 0);
}
PL_regsize = osize;
}
@@ -4343,7 +4343,7 @@ NULL
case CUTGROUP:
PL_reginput = locinput;
sv_yes_mark = st->u.mark.mark_name = scan->flags ? NULL :
- (SV*)rexi->data->data[ ARG( scan ) ];
+ MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
PUSH_STATE_GOTO(CUTGROUP_next,next);
/* NOTREACHED */
case CUTGROUP_next_fail:
@@ -5018,7 +5018,7 @@ NULL
case PRUNE:
PL_reginput = locinput;
if (!scan->flags)
- sv_yes_mark = sv_commit = (SV*)rexi->data->data[ ARG( scan ) ];
+ sv_yes_mark = sv_commit = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
PUSH_STATE_GOTO(COMMIT_next,next);
/* NOTREACHED */
case COMMIT_next_fail:
@@ -5032,7 +5032,7 @@ NULL
case MARKPOINT:
ST.prev_mark = mark_state;
ST.mark_name = sv_commit = sv_yes_mark
- = (SV*)rexi->data->data[ ARG( scan ) ];
+ = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
mark_state = st;
ST.mark_loc = PL_reginput = locinput;
PUSH_YES_STATE_GOTO(MARKPOINT_next,next);
@@ -5073,7 +5073,7 @@ NULL
otherwise do nothing. Meaning we need to scan
*/
regmatch_state *cur = mark_state;
- SV *find = (SV*)rexi->data->data[ ARG( scan ) ];
+ SV *find = MUTABLE_SV(rexi->data->data[ ARG( scan ) ]);
while (cur) {
if ( sv_eq( cur->u.mark.mark_name,
@@ -5685,8 +5685,8 @@ Perl_regclass_swash(pTHX_ const regexp *prog, register const regnode* node, bool
const U32 n = ARG(node);
if (data->what[n] == 's') {
- SV * const rv = (SV*)data->data[n];
- AV * const av = MUTABLE_AV(SvRV((SV*)rv));
+ SV * const rv = MUTABLE_SV(data->data[n]);
+ AV * const av = MUTABLE_AV(SvRV(rv));
SV **const ary = AvARRAY(av);
SV **a, **b;