summaryrefslogtreecommitdiff
path: root/src/MD4.c
diff options
context:
space:
mode:
authorThorsten Behrens <sbehrens@gmx.li>2010-12-28 16:26:52 -0500
committerThorsten Behrens <sbehrens@gmx.li>2010-12-28 16:26:52 -0500
commit295ce314d9f5c750d9569ac75a4f78331fae9992 (patch)
tree943c5f2e5237b3cf0665dd8fed278e4efa518770 /src/MD4.c
parent1873473e13161587b870adadc70c1d625f8bc5cf (diff)
downloadpycrypto-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/MD4.c b/src/MD4.c
index 51cbd31..e6e964d 100644
--- a/src/MD4.c
+++ b/src/MD4.c
@@ -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"