summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-01-18 16:20:02 -0700
committerKarl Williamson <khw@cpan.org>2018-01-30 22:58:15 -0700
commite1aa2579a2006b68a3715befb8faa75a98bfb6cd (patch)
tree8ce4db59e7b1356da037b89da559bc88039186ec /sv.c
parentdd2dbc5faf48a2985eee15f6f61fd81baec39198 (diff)
downloadperl-e1aa2579a2006b68a3715befb8faa75a98bfb6cd.tar.gz
Avoid changing locale when finding radix char
On systems that have the POSIX 2008 operations, including nl_langinfo_l(), this commit causes them to not have to actually change the locale when determining what the decimal point character is. The locale may have to change during the printing/reading of numbers, but eventually we can use sprintf_l(), if available, to avoid that too.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 771765342d..fa5295d4ba 100644
--- a/sv.c
+++ b/sv.c
@@ -15560,6 +15560,10 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
#ifdef USE_LOCALE_NUMERIC
PL_numeric_name = SAVEPV(proto_perl->Inumeric_name);
PL_numeric_radix_sv = sv_dup_inc(proto_perl->Inumeric_radix_sv, param);
+
+# if defined(HAS_NEWLOCALE) && ! defined(NO_POSIX_2008_LOCALE)
+ PL_underlying_numeric_obj = NULL;
+# endif
#endif /* !USE_LOCALE_NUMERIC */
PL_langinfo_buf = NULL;