summaryrefslogtreecommitdiff
path: root/src/pycrypto_compat.h
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 16:02:04 -0700
committerDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 19:13:33 -0700
commit5c0ec3238a2b8f69be75040c706959e5c852f5ad (patch)
tree53d561098fb3d75af643333a0302e32fafd33d9c /src/pycrypto_compat.h
parent1418e318180f651de1c4b08468b75ca719d703ba (diff)
downloadpycrypto-5c0ec3238a2b8f69be75040c706959e5c852f5ad.tar.gz
Py3k cleanup: Define PyInt_FromLong for Python 3.x and use it
This is the first of a series of changes that aims to reduce code duplication between the Python 3 and Python 2 versions of the C extensions.
Diffstat (limited to 'src/pycrypto_compat.h')
-rw-r--r--src/pycrypto_compat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pycrypto_compat.h b/src/pycrypto_compat.h
index 6ae31dd..274bfb4 100644
--- a/src/pycrypto_compat.h
+++ b/src/pycrypto_compat.h
@@ -31,6 +31,7 @@
#if PY_MAJOR_VERSION >= 3
# define IS_PY3K
+# define PyInt_FromLong PyLong_FromLong
#else
# define PyBytes_GET_SIZE PyString_GET_SIZE
# define PyBytes_FromStringAndSize PyString_FromStringAndSize