diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-10-30 22:08:41 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-10-30 22:08:41 +0000 |
commit | 1593ad57168f1432573f8effd44b7610e9f8f962 (patch) | |
tree | 24105a20e2e6c23c574462b348b603edff9dcd34 /regcomp.c | |
parent | daba3364ed9f39ba44b28575c032f6db52d47881 (diff) | |
download | perl-1593ad57168f1432573f8effd44b7610e9f8f962.tar.gz |
SvPV() does not take a const SV*, which means that the pattern argument
to Perl_re_compile() can't be const, which means that the pattern
argument to Perl_pregcomp() can't be const, as can't the argument in
the function in the regexp engine structure.
It's a shame that no-one spotted this earlier.
(Again) I may have rendered the documentation inaccurate.
p4raw-id: //depot/perl@34672
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4157,7 +4157,7 @@ extern const struct regexp_engine my_reg_engine; #ifndef PERL_IN_XSUB_RE REGEXP * -Perl_pregcomp(pTHX_ const SV * const pattern, const U32 flags) +Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags) { dVAR; HV * const table = GvHV(PL_hintgv); @@ -4183,14 +4183,14 @@ Perl_pregcomp(pTHX_ const SV * const pattern, const U32 flags) #endif REGEXP * -Perl_re_compile(pTHX_ const SV * const pattern, U32 pm_flags) +Perl_re_compile(pTHX_ SV * const pattern, U32 pm_flags) { dVAR; REGEXP *rx; struct regexp *r; register regexp_internal *ri; STRLEN plen; - char* exp = SvPV((SV*)pattern, plen); + char *exp = SvPV(pattern, plen); char* xend = exp + plen; regnode *scan; I32 flags; |