diff options
author | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-10-19 23:02:58 +0200 |
---|---|---|
committer | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-10-19 23:02:58 +0200 |
commit | 8390495a9d7c574213fbff51af6f2aea249d81c7 (patch) | |
tree | ebd647848d44f9ad152b1766a42f756c0b47638e /src | |
parent | c22fa18c0dedb43a8b19dcb9b29512ba59e1764b (diff) | |
download | pycrypto-8390495a9d7c574213fbff51af6f2aea249d81c7.tar.gz |
Further fixed for python 3
Diffstat (limited to 'src')
-rw-r--r-- | src/hash_SHA2_template.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash_SHA2_template.c b/src/hash_SHA2_template.c index b866d45..81b1ea6 100644 --- a/src/hash_SHA2_template.c +++ b/src/hash_SHA2_template.c @@ -31,6 +31,7 @@ */ #include "Python.h" +#include "pycrypto_compat.h" /* compress one block */ static void sha_compress(hash_state * hs) @@ -192,7 +193,7 @@ hash_digest (const hash_state *self) hash_copy((hash_state*)self,&temp); sha_done(&temp,digest); - return PyString_FromStringAndSize((char *)digest, DIGEST_SIZE); + return PyBytes_FromStringAndSize((char *)digest, DIGEST_SIZE); } #include "hash_template.c" |