diff options
author | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2007-04-21 21:30:47 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-23 09:39:38 +0000 |
commit | 3ab4a224eb8d34c041977288575d251ee18f009f (patch) | |
tree | 3f95471c1ad1e1dc9e59e85e81615c9a477fe8db /pp_ctl.c | |
parent | e1d1eefb8c88e0dcaf2bb9e6c04d7f6192be966f (diff) | |
download | perl-3ab4a224eb8d34c041977288575d251ee18f009f.tar.gz |
Re: [PATCH (incomplete)] Make regcomp use SV* sv, instead of char* exp, char* xend
Message-ID: <51dd1af80704211430m6ad1b4afy49b069faa61e33a9@mail.gmail.com>
p4raw-id: //depot/perl@31027
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -125,7 +125,7 @@ PP(pp_regcomp) } else { STRLEN len; - const char *t = SvPV_const(tmpstr, len); + const char *t = SvOK(tmpstr) ? SvPV_const(tmpstr, len) : ""; re = PM_GETRE(pm); /* Check against the last compiled regexp. */ @@ -150,10 +150,10 @@ PP(pp_regcomp) if (DO_UTF8(tmpstr)) pm_flags |= RXf_UTF8; - if (eng) - PM_SETRE(pm, CALLREGCOMP_ENG(eng,(char *)t, (char *)t + len, pm_flags)); - else - PM_SETRE(pm, CALLREGCOMP((char *)t, (char *)t + len, pm_flags)); + if (eng) + PM_SETRE(pm, CALLREGCOMP_ENG(eng, tmpstr, pm_flags)); + else + PM_SETRE(pm, CALLREGCOMP(tmpstr, pm_flags)); PL_reginterp_cnt = 0; /* XXXX Be extra paranoid - needed inside tie/overload accessors. */ |