From d60dffc962539eaf300bba2e698474830e35e4d2 Mon Sep 17 00:00:00 2001 From: Brittany Reynoso Date: Sun, 30 Aug 2026 17:09:25 -0700 Subject: [PATCH 1/3] Inline CJK replacement writer call --- Modules/cjkcodecs/multibytecodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 32c96c9d2cb3cde..d90900457574d94 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -429,8 +429,8 @@ multibytecodec_decerror(const MultibyteCodec *codec, } if (errors == ERROR_REPLACE) { - if (_PyUnicodeWriter_WriteChar(&buf->writer, - Py_UNICODE_REPLACEMENT_CHARACTER) < 0) + if (_PyUnicodeWriter_WriteCharInline( + &buf->writer, Py_UNICODE_REPLACEMENT_CHARACTER) < 0) goto errorexit; } if (errors == ERROR_IGNORE || errors == ERROR_REPLACE) { From 8023890a47ba2b6e8aa798b516cf9501edbcd517 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 03:09:16 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst diff --git a/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst b/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst new file mode 100644 index 000000000000000..86bd1079d720795 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst @@ -0,0 +1 @@ +Optimize cjk codec decode() with 'replace' error handling From 9e98d3205354dd79924857f7297fcf20121783b6 Mon Sep 17 00:00:00 2001 From: Donghee Na Date: Tue, 1 Sep 2026 13:40:23 +0900 Subject: [PATCH 3/3] Delete Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst --- .../next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst diff --git a/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst b/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst deleted file mode 100644 index 86bd1079d720795..000000000000000 --- a/Misc/NEWS.d/next/Library/2026-09-01-03-09-14.gh-issue-156745.sLPFxu.rst +++ /dev/null @@ -1 +0,0 @@ -Optimize cjk codec decode() with 'replace' error handling