summaryrefslogtreecommitdiff
path: root/embedvar.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 /embedvar.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 'embedvar.h')
-rw-r--r--embedvar.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/embedvar.h b/embedvar.h
index acb00446c2..6cb33d4309 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -295,6 +295,8 @@
#define PL_statusvalue_vms (vTHX->Istatusvalue_vms)
#define PL_stderrgv (vTHX->Istderrgv)
#define PL_stdingv (vTHX->Istdingv)
+#define PL_stdize_locale_buf (vTHX->Istdize_locale_buf)
+#define PL_stdize_locale_bufsize (vTHX->Istdize_locale_bufsize)
#define PL_strtab (vTHX->Istrtab)
#define PL_strxfrm_NUL_replacement (vTHX->Istrxfrm_NUL_replacement)
#define PL_strxfrm_is_behaved (vTHX->Istrxfrm_is_behaved)