summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-04-10 19:44:16 -0600
committerKarl Williamson <khw@cpan.org>2022-08-09 18:05:59 -0600
commit32899cfbfbeefbe5023d40fcf4ed4420752f9b20 (patch)
treeb72926a8973f9006f35dc2d1cc6b26c030951580 /intrpvar.h
parent82e2ef274609fbe3e9e3a0c11bab9b6ef9b3d959 (diff)
downloadperl-32899cfbfbeefbe5023d40fcf4ed4420752f9b20.tar.gz
locale.c: Generalize stdize_locale()
This function is rewritten to handle LC_ALL, and to make it easier to add new checks. There is also a change, which I think is an improvement, in that everything starting with a \n is trimmed, instead of just a trailing \n. A couple of calls to stdize_locale() are removed, as they are redundant, because they are called only as a result of Perl_setlocale() being called, and that ends up calling stdize_locale always, early on. The call to savepv() is also moved in a couple cases to after the result is known to not be NULL I originally had such a new check in mind, but it turned out that doing it here didn't solve the problem, so this commit has been amended (before ever being pushed) to not include that. chomped.
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index cdca7e3e3a..d607e452dc 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -761,6 +761,8 @@ PERLVARI(I, langinfo_buf, char *, NULL)
PERLVARI(I, langinfo_bufsize, Size_t, 0)
PERLVARI(I, setlocale_buf, const char *, NULL)
PERLVARI(I, setlocale_bufsize, Size_t, 0)
+PERLVARI(I, stdize_locale_buf, const char *, NULL)
+PERLVARI(I, stdize_locale_bufsize, Size_t, 0)
#ifdef PERL_SAWAMPERSAND
PERLVAR(I, sawampersand, U8) /* must save all match strings */