]> Savannah Git Hosting - gnulib.git/commitdiff
nstrftime, fprintftime: Optimize.
authorBruno Haible <bruno@clisp.org>
Thu, 15 Feb 2024 18:40:45 +0000 (19:40 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 15 Feb 2024 21:30:54 +0000 (22:30 +0100)
* lib/strftime.c (should_remove_ampm): Call gl_locale_name_unsafe
instead of gl_locale_name.
* modules/nstrftime (Depends-on): Remove localename. Add
localename-unsafe.

ChangeLog
lib/strftime.c
modules/nstrftime

index 487e5cf1dd019bfab7d5413982b99a7fa9b271bf..68a0050a6886a80ce3560f6d0cce7f4afd4e3302 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-15  Bruno Haible  <bruno@clisp.org>
+
+       nstrftime, fprintftime: Optimize.
+       * lib/strftime.c (should_remove_ampm): Call gl_locale_name_unsafe
+       instead of gl_locale_name.
+       * modules/nstrftime (Depends-on): Remove localename. Add
+       localename-unsafe.
+
 2024-02-15  Bruno Haible  <bruno@clisp.org>
 
        localename-unsafe: Optimize.
index c7256c3d354c6895bf5ee499bc1c4905788a98c7..128176cad40c9b93b4d7193ffcc21295d9616cd6 100644 (file)
@@ -401,7 +401,7 @@ should_remove_ampm (void)
      lt lv mg mhr mi mk mn ms mt nb nds nhn nl nn nr nso oc os pap pl pt ro
      ru rw sah sc se sgs sk sl sm sr ss st su sv szl tg tk tn ts tt ug uk unm
      uz ve wae wo xh zu  */
-  const char *loc = gl_locale_name (LC_TIME, "LC_TIME");
+  const char *loc = gl_locale_name_unsafe (LC_TIME, "LC_TIME");
   bool remove_ampm = false;
   switch (loc[0])
     {
index 77a8594c4cf57541cb3b4686fbc3e1b7b6ba9383..c5ab2710c02d53800fb63beed8b6f92f0312e216 100644 (file)
@@ -15,7 +15,7 @@ errno
 extensions
 intprops
 libc-config
-localename
+localename-unsafe
 stdbool
 stdckdint
 time_rz