https://github.com/python/cpython/commit/97c59f9d61f28a86ab4e470fd5382848c9b5536f
commit: 97c59f9d61f28a86ab4e470fd5382848c9b5536f
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-10-27T09:21:43Z
summary:

[3.14] Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) 
(GH-140637) (#140658)

Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (GH-140637)
(cherry picked from commit 7d70a147f58edabc9691869a0e8b606c9c3ac184)

Co-authored-by: Shamil <[email protected]>

files:
M Objects/unicodeobject.c

diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 0ff2d71924ff9c..c71c5720ea090e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5497,7 +5497,6 @@ unicode_decode_utf8(const char *s, Py_ssize_t size,
     if (maxchr <= 255) {
         memcpy(PyUnicode_1BYTE_DATA(u), s, pos);
         s += pos;
-        size -= pos;
         writer.pos = pos;
     }
 
@@ -5545,7 +5544,6 @@ unicode_decode_utf8_writer(_PyUnicodeWriter *writer,
             return 0;
         }
         s += decoded;
-        size -= decoded;
     }
 
     return unicode_decode_utf8_impl(writer, starts, s, end,

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to