diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-10-30 16:47:21 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-06-13 13:25:51 +0100 |
commit | 87a95bcc2d7801f71814a3a5bb160c0bd5b91285 (patch) | |
tree | aad3403fd298d475f4384630c48b874705b5fce0 /regcomp.c | |
parent | 8f345207f1de4fd569ad930ffa22666871bb4d04 (diff) | |
download | perl-87a95bcc2d7801f71814a3a5bb160c0bd5b91285.tar.gz |
regcomp.c: Use no_mg for 2nd fetch of pattern
The pattern could be tied, for example, and so only want to access it
once. I couldn't come up with a test case that actually exercised this,
but I can think of future changes to regcomp that would.
[ this is a re-application by davem of commit
3e0b93e82af0f1a033bcdb918b413113f1d61cf0 ]
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5209,7 +5209,9 @@ Perl_re_op_compile(pTHX_ SV * const * const patternp, int pat_count, xend = exp + plen; } else { - exp = (char*)Perl_bytes_to_utf8(aTHX_ (U8*)SvPV(pat, plen), &len); + exp = (char*)Perl_bytes_to_utf8(aTHX_ + (U8*)SvPV_nomg(pat, plen), + &len); xend = exp + len; SAVEFREEPV(exp); } |