]> Savannah Git Hosting - gnulib.git/commitdiff
mcel: Fix compilation error in tests.
authorBruno Haible <bruno@clisp.org>
Tue, 3 Oct 2023 08:16:01 +0000 (10:16 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 3 Oct 2023 08:16:01 +0000 (10:16 +0200)
* lib/mcel.h (mcel_scan): Undefine 'mbs' after use.

ChangeLog
lib/mcel.h

index 14892c7f719f13a423b591305b4c832d45c11bcd..38e339b6c349d8f76a24fff030bb6cfab4649f68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-03  Bruno Haible  <bruno@clisp.org>
+
+       mcel: Fix compilation error in tests.
+       * lib/mcel.h (mcel_scan): Undefine 'mbs' after use.
+
 2023-10-02  Bruno Haible  <bruno@clisp.org>
 
        localename, gettext: Avoid crash on macOS 14.
index 54ae1259576cdd978fb00938b454cae2101c8f12..b178c7aec9d834a6373d5741ce2696e56d41b711 100644 (file)
@@ -249,6 +249,8 @@ mcel_scan (char const *p, char const *lim)
   char32_t ch;
   size_t len = mbrtoc32 (&ch, p, lim - p, &mbs);
 
+#undef mbs
+
   /* Any LEN with top bit set is an encoding error, as LEN == (size_t) -3
      is not supported and MB_LEN_MAX is small.  */
   if (_GL_UNLIKELY ((size_t) -1 / 2 < len))