summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-04-11 09:07:07 -0600
committerKarl Williamson <khw@cpan.org>2022-09-01 09:02:04 -0600
commit37b8263e6d237e6e7d0e92a6c311d9b6121ea57c (patch)
tree8172810d2202b388da9a7547831d94bdc014d973 /perl.c
parent430ae200b5739fbee33c70114a733afecbced76c (diff)
downloadperl-37b8263e6d237e6e7d0e92a6c311d9b6121ea57c.tar.gz
locale.c: Save underlying radix character
When changing locales the new decimal point needs to be calculated. This commit creates a new per-interpreter variable to save that calculation, so it only has to be done when a new locale is set; prior to this commit it was recalculated each time it was needed. The calculation is still performed twice when the new locale is switched into. But the redundant calculation will be removed in a couple of commits hence.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 2a3931e642..c63e263e7d 100644
--- a/perl.c
+++ b/perl.c
@@ -1160,6 +1160,8 @@ perl_destruct(pTHXx)
PL_numeric_name = NULL;
SvREFCNT_dec(PL_numeric_radix_sv);
PL_numeric_radix_sv = NULL;
+ SvREFCNT_dec(PL_underlying_radix_sv);
+ PL_underlying_radix_sv = NULL;
#endif
#ifdef USE_LOCALE_CTYPE
Safefree(PL_ctype_name);