summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/multibytecodec.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 02:18:59 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-01 02:18:59 (GMT)
commitb37b17423b294ee3bf5a28b8c358ca45cf681030 (patch)
treeeef378938969f815c83c515503727127aa0f82fc /Modules/cjkcodecs/multibytecodec.c
parent08b523a194a066e1e758e12594d8e423b57460a9 (diff)
downloadcpython-b37b17423b294ee3bf5a28b8c358ca45cf681030.zip
cpython-b37b17423b294ee3bf5a28b8c358ca45cf681030.tar.gz
cpython-b37b17423b294ee3bf5a28b8c358ca45cf681030.tar.bz2
Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
Create an empty string with the new Unicode API.
Diffstat (limited to 'Modules/cjkcodecs/multibytecodec.c')
-rw-r--r--Modules/cjkcodecs/multibytecodec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index ded9188..abad251 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -633,7 +633,7 @@ MultibyteCodec_Decode(MultibyteCodecObject *self,
if (datalen == 0) {
PyBuffer_Release(&pdata);
ERROR_DECREF(errorcb);
- return make_tuple(PyUnicode_FromUnicode(NULL, 0), 0);
+ return make_tuple(PyUnicode_New(0, 0), 0);
}
buf.excobj = NULL;
@@ -1265,7 +1265,7 @@ mbstreamreader_iread(MultibyteStreamReaderObject *self,
Py_ssize_t rsize, finalsize = 0;
if (sizehint == 0)
- return PyUnicode_FromUnicode(NULL, 0);
+ return PyUnicode_New(0, 0);
buf.outobj = buf.excobj = NULL;
cres = NULL;