Skip to content

Commit

Permalink
Real regexps are stored via RVs, IVs can only mean spare slots. Hence
Browse files Browse the repository at this point in the history
it's safe to make the scalar undefined, rather than calling out to
write a 0 that would also be interpreted as a NULL pointer.

p4raw-id: //depot/perl@32943
  • Loading branch information
nwc10 committed Jan 10, 2008
1 parent 110f302 commit 5c9f9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion op.c
Expand Up @@ -3370,7 +3370,7 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags)
SV * const repointer = av_pop((AV*)PL_regex_pad[0]);
const IV offset = SvIV(repointer);
pmop->op_pmoffset = offset;
sv_setiv(repointer,0);
SvOK_off(repointer);
assert(repointer == PL_regex_pad[offset]);
/* One reference remains, in PL_regex_pad[offset] */
SvREFCNT_dec(repointer);
Expand Down

0 comments on commit 5c9f9c9

Please sign in to comment.