diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
commit | 593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch) | |
tree | c0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Modules/sha512module.c | |
parent | c3cb683d638e9d660c18a05293a576f98965166e (diff) | |
download | cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Modules/sha512module.c')
-rw-r--r-- | Modules/sha512module.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/sha512module.c b/Modules/sha512module.c index f2c230b..1a2b145 100644 --- a/Modules/sha512module.c +++ b/Modules/sha512module.c @@ -498,7 +498,7 @@ SHA512_digest(SHAobject *self, PyObject *unused) SHAcopy(self, &temp); sha512_final(digest, &temp); - return PyString_FromStringAndSize((const char *)digest, self->digestsize); + return PyBytes_FromStringAndSize((const char *)digest, self->digestsize); } PyDoc_STRVAR(SHA512_hexdigest__doc__, @@ -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 = PyBytes_FromStringAndSize(NULL, self->digestsize * 2); if (!retval) return NULL; - hex_digest = PyString_AsString(retval); + hex_digest = PyBytes_AsString(retval); if (!hex_digest) { Py_DECREF(retval); return NULL; @@ -576,9 +576,9 @@ static PyObject * SHA512_get_name(PyObject *self, void *closure) { if (((SHAobject *)self)->digestsize == 64) - return PyString_FromStringAndSize("SHA512", 6); + return PyBytes_FromStringAndSize("SHA512", 6); else - return PyString_FromStringAndSize("SHA384", 6); + return PyBytes_FromStringAndSize("SHA384", 6); } static PyGetSetDef SHA_getseters[] = { |