This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Keep better track of C/non-C locale
authorKarl Williamson <khw@cpan.org>
Mon, 7 Jul 2014 20:30:59 +0000 (14:30 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Jul 2014 14:04:53 +0000 (08:04 -0600)
commit126aedc49bc9cee9fc4dc22101aeb9f422ca8cc2
tree0c409a14797f97362cfde726f107725b62415a51
parenta39edc4c877304d4075679b1d8de1904671a9c37
locale.c: Keep better track of C/non-C locale

Perl uses three interpreter-level (but private) variables to keep track
of numeric locales.  PL_numeric name is the current underlying locale.
PL_standard is a boolean to indicate if we are switched to the C (or
POSIX) locale, and PL_local is a boolean to indicate if we are switched
to the underlying one.  The reason there are two booleans is if the
underlying locale is C, both can be true at the same time.  But the code
that is being changed by this commit didn't realize this, and
could unnecessarily set the booleans to FALSE.  This could cause
unnecessary switching of locales.
locale.c