diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 435529f..e0d9b67 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -1629,6 +1629,9 @@ mbstreamwriter_reset(MultibyteStreamWriterObject *self) { PyObject *pwrt; + if (!self->pending) + Py_RETURN_NONE; + pwrt = multibytecodec_encode(self->codec, &self->state, self->pending, NULL, self->errors, MBENC_FLUSH | MBENC_RESET); |