Skip to content

Commit d915492

Browse files
authored
gh-156537: Optimize codec.decode by inlining the per-character write in CJK decoders (gh-156538)
1 parent 3e245fa commit d915492

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/cjkcodecs/cjkcodecs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ get_module_state(PyObject *mod)
155155

156156
#define OUTCHAR(c) \
157157
do { \
158-
if (_PyUnicodeWriter_WriteChar(writer, (c)) < 0) \
159-
return MBERR_EXCEPTION; \
158+
if (_PyUnicodeWriter_WriteCharInline(writer, (c)) < 0) \
159+
return MBERR_EXCEPTION; \
160160
} while (0)
161161

162162
#define OUTCHAR2(c1, c2) \

0 commit comments

Comments
 (0)