diff options
author | Yves Orton <demerphq@gmail.com> | 2007-06-03 19:21:55 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-06-03 15:36:25 +0000 |
commit | c490c714018f95e6fedac7e6bef61da086a72f4c (patch) | |
tree | 05b6f366984a2c1315b3224cef383caa19405392 /regcomp.c | |
parent | bfbf02a1bb78f5006578304da872a3d29b074c1f (diff) | |
download | perl-c490c714018f95e6fedac7e6bef61da086a72f4c.tar.gz |
Re: BBC(Bleadperl Breaks CPAN) Today: String::Multibyte
Message-ID: <9b18b3110706030821u39460f96ic342dda8ba9fcdf7@mail.gmail.com>
p4raw-id: //depot/perl@31328
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1966,7 +1966,8 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs } if ( count == 1 ) { SV **tmp = av_fetch( revcharmap, idx, 0); - char *ch = SvPV_nolen( *tmp ); + STRLEN len; + char *ch = SvPV( *tmp, len ); DEBUG_OPTIMISE_r({ SV *sv=sv_newmortal(); PerlIO_printf( Perl_debug_log, @@ -1985,11 +1986,9 @@ S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *firs str=STRING(convert); STR_LEN(convert)=0; } - while (*ch) { + STR_LEN(convert) += len; + while (len--) *str++ = *ch++; - STR_LEN(convert)++; - } - } else { #ifdef DEBUGGING if (state>1) |