diff --git a/mercurial/thirdparty/sha1dc/cext.c b/mercurial/thirdparty/sha1dc/cext.c --- a/mercurial/thirdparty/sha1dc/cext.c +++ b/mercurial/thirdparty/sha1dc/cext.c @@ -95,7 +95,7 @@ hexhash[i * 2] = hexdigit[hash[i] >> 4]; hexhash[i * 2 + 1] = hexdigit[hash[i] & 15]; } - return PyString_FromStringAndSize(hexhash, 40); + return PY23(PyString_FromStringAndSize, PyUnicode_FromStringAndSize)(hexhash, 40); } static PyTypeObject sha1ctxType;