Use unicode
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 @@
     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_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;