This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01ccd49
)
S_multiconcat() Use faster variant counting
author
Karl Williamson
<khw@cpan.org>
Thu, 23 Nov 2017 06:10:01 +0000
(23:10 -0700)
committer
Karl Williamson
<khw@cpan.org>
Fri, 15 Mar 2019 16:30:28 +0000
(10:30 -0600)
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
b4ba9c8
..
1f7ae3e
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-3102,13
+3102,8
@@
S_maybe_multiconcat(pTHX_ OP *o)
/* see if any strings would grow if converted to utf8 */
if (!utf8) {
- char *p = (char*)argp->p;
- STRLEN len = argp->len;
- while (len--) {
- U8 c = *p++;
- if (!UTF8_IS_INVARIANT(c))
- variant++;
- }
+ variant += variant_under_utf8_count((U8 *) argp->p,
+ (U8 *) argp->p + argp->len);
}
}