diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-29 23:56:56 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-01 12:51:57 -0700 |
commit | 0d788f38463b7bfebf74c59cb7d648fc3e83f204 (patch) | |
tree | e27cd181da2b7df43a8ec14f521fa972fe66c7c5 /pp.c | |
parent | 7c1f5fb6d5d76ca76a743274330a7d906bb82a6b (diff) | |
download | perl-0d788f38463b7bfebf74c59cb7d648fc3e83f204.tar.gz |
Make rvalue substr call overloading once on utf8 str
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3075,7 +3075,7 @@ PP(pp_substr) } else tmps = SvPV_const(sv, curlen); if (DO_UTF8(sv)) { - utf8_curlen = sv_len_utf8_nomg(sv); + utf8_curlen = sv_or_pv_len_utf8(sv, tmps, curlen); if (utf8_curlen == curlen) utf8_curlen = 0; else @@ -3093,7 +3093,7 @@ PP(pp_substr) byte_len = len; byte_pos = utf8_curlen - ? sv_pos_u2b_flags(sv, pos, &byte_len, SV_CONST_RETURN) : pos; + ? sv_or_pv_pos_u2b(sv, tmps, pos, &byte_len) : pos; tmps += byte_pos; |