This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Do savepv() ASAP
authorKarl Williamson <khw@cpan.org>
Wed, 17 Jan 2018 20:54:27 +0000 (13:54 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 31 Jan 2018 13:57:50 +0000 (06:57 -0700)
commitd6189047176e14277a152d1c4456d167adda6969
tree93fba1b195331476216e73ec8c41cc52eb1a12ab
parent7d5966ae3c3b8f0e43fa09554a46cb8de9c98f5f
locale.c: Do savepv() ASAP

When this code is called on a threaded perl, it's possible that another
thread could zap the setlocale return buffer, if it's not reentrant.  I
suspect we would have seen this more often if that was the case, but
this commit improves things by doing the save immediately, reducing the
unsafe interval.
locale.c