summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-09-01 10:29:04 -0600
committerKarl Williamson <khw@cpan.org>2022-09-01 10:29:04 -0600
commitcd55125d69f5f698ef7cbdd650cda7d2e59fc388 (patch)
treef21f3bdb979558ab7647675432958c65f9eff333 /sv.c
parent992e38c75c3458a29260860388d37ee4204e864e (diff)
parent21afce673d6a6fb9bf757bcdad21ded54f5d351b (diff)
downloadperl-cd55125d69f5f698ef7cbdd650cda7d2e59fc388.tar.gz
Merge branch 'locale.c: Improve newcollate' into blead
newcollate is called when LC_COLLATE is set to a new locale. This series of commits improves its operation Some platforms require LC_CTYPE and LC_COLLATE to be the same locale in order to operate properly. These commits now bring LC_CTYPE into sync with LC_COLLATE for the duration of the calculations. More and better debugging statements are added Memory is allocated when a string is collated. The amount is roughly a linear function of the string length, varying depending on the locale. To save some recalculations, perl calculates and saves coefficients for the current locale's equation once, revising them if necessary. Prior to this commit, this somewhat expensive calculation was done every time the locale changed. Now it is deferred until the first time it is needed.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 0f1a05e2f7..5ee2df90e0 100644
--- a/sv.c
+++ b/sv.c
@@ -8420,7 +8420,7 @@ Perl_sv_collxfrm_flags(pTHX_ SV *const sv, STRLEN *const nxp, const I32 flags)
Safefree(mg->mg_ptr);
s = SvPV_flags_const(sv, len, flags);
- if ((xf = _mem_collxfrm(s, len, &xlen, cBOOL(SvUTF8(sv))))) {
+ if ((xf = mem_collxfrm_(s, len, &xlen, cBOOL(SvUTF8(sv))))) {
if (! mg) {
mg = sv_magicext(sv, 0, PERL_MAGIC_collxfrm, &PL_vtbl_collxfrm,
0, 0);