summaryrefslogtreecommitdiffstats
path: root/Modules/sha512module.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-25 08:01:41 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-25 08:01:41 (GMT)
commitb4e2f76d240a5a03d65d6e14f0c868c3bc805fb9 (patch)
tree1538053f81fa970632f2ef9583ddd8a3218b13ca /Modules/sha512module.c
parenta369c5aba6fcc545b0d3d40050da6e2ff33e06fb (diff)
downloadcpython-b4e2f76d240a5a03d65d6e14f0c868c3bc805fb9.zip
cpython-b4e2f76d240a5a03d65d6e14f0c868c3bc805fb9.tar.gz
cpython-b4e2f76d240a5a03d65d6e14f0c868c3bc805fb9.tar.bz2
Use unicode
Diffstat (limited to 'Modules/sha512module.c')
-rw-r--r--Modules/sha512module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index 5eedb4c..1d3a70b 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -510,7 +510,7 @@ SHA512_hexdigest(SHAobject *self, PyObject *unused)
unsigned char digest[SHA_DIGESTSIZE];
SHAobject temp;
PyObject *retval;
- char *hex_digest;
+ Py_UNICODE *hex_digest;
int i, j;
/* Get the raw (binary) digest value */
@@ -518,10 +518,10 @@ SHA512_hexdigest(SHAobject *self, PyObject *unused)
sha512_final(digest, &temp);
/* Create a new string */
- retval = PyString_FromStringAndSize(NULL, self->digestsize * 2);
+ retval = PyUnicode_FromStringAndSize(NULL, self->digestsize * 2);
if (!retval)
return NULL;
- hex_digest = PyString_AsString(retval);
+ hex_digest = PyUnicode_AS_UNICODE(retval);
if (!hex_digest) {
Py_DECREF(retval);
return NULL;