svn commit: r1934430 - subversion/trunk/subversion/libsvn_subr

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177926887538.1174171.3457662918804152178@svn03-he-fi>
Author: rinrab
Date: Wed May 20 09:21:15 2026
New Revision: 1934430

Log:
Use utf8proc_ssize_t instead of int for nbytes. This is the type that
utf8proc_iterate() actually returns.

* subversion/libsvn_subr/utf8proc.c
  (svn_utf_cstring_utf8_width, utf8_skipn): Change type of a local variable.

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:17:11 2026	(r1934429)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c	Wed May 20 09:21:15 2026	(r1934430)
@@ -623,7 +623,8 @@ svn_utf_cstring_utf8_width(const char *c
       utf8proc_int32_t ucs;
       int w;
 
-      int nbytes = utf8proc_iterate((const utf8proc_uint8_t *)cstr, -1, &ucs);
+      utf8proc_ssize_t nbytes = utf8proc_iterate(
+          (const utf8proc_uint8_t *)cstr, -1, &ucs);
 
       if (nbytes < 0)
         return -1;
@@ -650,7 +651,8 @@ utf8_skipn(const char *cstr, apr_size_t
     {
       utf8proc_int32_t ucs;
 
-      int nbytes = utf8proc_iterate((const utf8proc_uint8_t *)cstr, -1, &ucs);
+      utf8proc_ssize_t nbytes = utf8proc_iterate(
+          (const utf8proc_uint8_t *)cstr, -1, &ucs);
 
       if (nbytes < 0)
         return NULL;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.