]> Savannah Git Hosting - gnulib.git/commitdiff
nl_langinfo: Add comment regarding per-thread locales.
authorBruno Haible <bruno@clisp.org>
Wed, 8 Feb 2023 22:44:33 +0000 (23:44 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 8 Feb 2023 22:44:33 +0000 (23:44 +0100)
* lib/nl_langinfo.c (ctype_codeset): Add comment.

ChangeLog
lib/nl_langinfo.c

index a6b0d2eef7565ff3e1b4c7708d4a704d3d146af6..97f810d1fa2b467d82229bf6188b4a0104632782 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2023-02-08  Bruno Haible  <bruno@clisp.org>
 
+       nl_langinfo: Add comment regarding per-thread locales.
+       * lib/nl_langinfo.c (ctype_codeset): Add comment.
+
        nl_langinfo tests: Add another test.
        * tests/test-nl_langinfo2.c: New file.
        * tests/test-nl_langinfo2.sh: New file.
index 131166fd7125140209b912f856ab2d5dcc86e23f..f872c6d5e22dbf7ddcda9a05c10ddf9f88e8a97e 100644 (file)
@@ -70,6 +70,8 @@
 static char *
 ctype_codeset (void)
 {
+  /* This function is only used on platforms which don't have uselocale().
+     Therefore we don't need to look at the per-thread locale first, here.  */
   static char result[2 + 10 + 1];
   char buf[2 + 10 + 1];
   char locale[SETLOCALE_NULL_MAX];