From 2f3915a08311dcbb3c01723532778c4ea0206183 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 25 May 2024 12:14:29 +0200 Subject: [PATCH] uchar-c23: Speed up mbrtoc32 on Solaris 11.4. * lib/lc-charset-unicode.c (get_converters): Cache the return value. --- ChangeLog | 5 +++++ lib/lc-charset-unicode.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ca996e5e03..36b3fb03ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-05-25 Bruno Haible + + uchar-c23: Speed up mbrtoc32 on Solaris 11.4. + * lib/lc-charset-unicode.c (get_converters): Cache the return value. + 2024-05-23 Bruno Haible mbrtoc32: Work around bug in Cygwin 3.5.3. diff --git a/lib/lc-charset-unicode.c b/lib/lc-charset-unicode.c index afbc188ad7..ad9e4ad11d 100644 --- a/lib/lc-charset-unicode.c +++ b/lib/lc-charset-unicode.c @@ -1,5 +1,5 @@ /* Conversion between the current locale's character encoding and Unicode. - Copyright (C) 2023 Free Software Foundation, Inc. + Copyright (C) 2023-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -107,6 +107,7 @@ get_converters (const char *encoding) return NULL; } strcpy (conv->encoding, encoding); + gl_tls_set (converters_key, conv); } else if (strcmp (conv->encoding, encoding) != 0) { -- 2.39.5