summaryrefslogtreecommitdiff
path: root/intrpvar.h
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 /intrpvar.h
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 'intrpvar.h')
-rw-r--r--intrpvar.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index 3cc83881ed..2bd43ab1f1 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -620,6 +620,11 @@ PERLVARI(I, numeric_underlying_is_standard, bool, TRUE)
PERLVAR(I, numeric_name, char *) /* Name of current numeric locale */
PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */
+# if defined(HAS_NEWLOCALE) && ! defined(NO_POSIX_2008_LOCALE)
+
+PERLVARI(I, underlying_numeric_obj, locale_t, NULL)
+
+# endif
#endif /* !USE_LOCALE_NUMERIC */
/* Unicode inversion lists */