+2023-07-11 Bruno Haible <bruno@clisp.org>
+
+ mbsrtoc32s, mbsnrtoc32s: Small optimization.
+ * lib/mbsrtoc32s.c (USES_C32): Set to 0 when the module
+ 'mbrtoc32-regular' is in use.
+ * lib/mbsnrtoc32s.c (USES_C32): Likewise.
+
2023-07-11 Bruno Haible <bruno@clisp.org>
mbswidth: Add a benchmark.
# define DCHAR_T char32_t
# define INTERNAL_STATE _gl_mbsrtoc32s_state
# define MBRTOWC mbrtoc32
-# define USES_C32 1
+# if GNULIB_MBRTOC32_REGULAR
+ /* If the 'mbrtoc32-regular' module is in use, we don't need to handle
+ a (size_t)(-3) return value from mbrtoc32. */
+# define USES_C32 0
+# else
+# define USES_C32 1
+# endif
# include "mbsnrtowcs-impl.h"
#else
# define DCHAR_T char32_t
# define INTERNAL_STATE _gl_mbsrtoc32s_state
# define MBRTOWC mbrtoc32
-# define USES_C32 1
+# if GNULIB_MBRTOC32_REGULAR
+ /* If the 'mbrtoc32-regular' module is in use, we don't need to handle
+ a (size_t)(-3) return value from mbrtoc32. */
+# define USES_C32 0
+# else
+# define USES_C32 1
+# endif
# include "mbsrtowcs-impl.h"
#else