diff options
author | Thorsten Behrens <sbehrens@gmx.li> | 2010-12-28 16:26:52 -0500 |
---|---|---|
committer | Thorsten Behrens <sbehrens@gmx.li> | 2010-12-28 16:26:52 -0500 |
commit | 295ce314d9f5c750d9569ac75a4f78331fae9992 (patch) | |
tree | 943c5f2e5237b3cf0665dd8fed278e4efa518770 /src/MD4.c | |
parent | 1873473e13161587b870adadc70c1d625f8bc5cf (diff) | |
download | pycrypto-295ce314d9f5c750d9569ac75a4f78331fae9992.tar.gz |
Changes to allow pycrpyto to work on Python 3.x as well as 2.1 through 2.7
Diffstat (limited to 'src/MD4.c')
-rw-r--r-- | src/MD4.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -28,7 +28,8 @@ #include <string.h> -#include <Python.h> +#include "Python.h" +#include "pycrypto_compat.h" #define MODULE_NAME MD4 #define DIGEST_SIZE 16 @@ -213,7 +214,7 @@ hash_digest (const hash_state *self) digest[14]=(temp.D >> 16) & 255; digest[15]=(temp.D >> 24) & 255; - return PyString_FromStringAndSize((char *) digest, 16); + return PyBytes_FromStringAndSize((char *) digest, 16); } #include "hash_template.c" |