summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-10-30 22:08:41 +0000
committerNicholas Clark <nick@ccl4.org>2008-10-30 22:08:41 +0000
commit1593ad57168f1432573f8effd44b7610e9f8f962 (patch)
tree24105a20e2e6c23c574462b348b603edff9dcd34 /regcomp.c
parentdaba3364ed9f39ba44b28575c032f6db52d47881 (diff)
downloadperl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index da6891092b..8e197f746f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;