Author: rinrab
Date: Wed May 20 09:17:11 2026
New Revision: 1934429

Log:
Cast string pointer to a const-utf8proc_uint8_t* instead of apr_byte_t* before
calling utf8proc_iterate().

* subversion/libsvn_subr/utf8proc.c
  (utf8_skipn, svn_utf_cstring_utf8_width,
   svn_utf__fuzzy_escape): Use more relevant types.

Suggested by: kotkov

Modified:
   subversion/trunk/subversion/libsvn_subr/utf8proc.c

Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c  Wed May 20 09:04:40 
2026        (r1934428)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c  Wed May 20 09:17:11 
2026        (r1934429)
@@ -488,7 +488,8 @@ svn_utf__fuzzy_escape(const char *src, a
 
           while (done < length)
             {
-              len = utf8proc_iterate((apr_byte_t*)src + done, length - done, 
&uc);
+              len = utf8proc_iterate((const utf8proc_uint8_t *)src + done,
+                                     length - done, &uc);
               if (len < 0)
                 break;
               done += len;
@@ -622,7 +623,7 @@ svn_utf_cstring_utf8_width(const char *c
       utf8proc_int32_t ucs;
       int w;
 
-      int nbytes = utf8proc_iterate((apr_byte_t*)cstr, -1, &ucs);
+      int nbytes = utf8proc_iterate((const utf8proc_uint8_t *)cstr, -1, &ucs);
 
       if (nbytes < 0)
         return -1;
@@ -649,7 +650,7 @@ utf8_skipn(const char *cstr, apr_size_t
     {
       utf8proc_int32_t ucs;
 
-      int nbytes = utf8proc_iterate((apr_byte_t*)cstr, -1, &ucs);
+      int nbytes = utf8proc_iterate((const utf8proc_uint8_t *)cstr, -1, &ucs);
 
       if (nbytes < 0)
         return NULL;

Reply via email to