summaryrefslogtreecommitdiff
path: root/src/pycrypto_compat.h
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 16:28:12 -0700
committerDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 19:14:35 -0700
commit52287434f824732c52ba21b771a9626c312ca4e9 (patch)
tree246277b4c7833000f68125c0e65bd85503074931 /src/pycrypto_compat.h
parentab8fc54acaa511d224a9855f9cfc253e7d280547 (diff)
downloadpycrypto-52287434f824732c52ba21b771a9626c312ca4e9.tar.gz
Py3k cleanup: PyInt_CheckExact & PyInt_AS_LONG
Diffstat (limited to 'src/pycrypto_compat.h')
-rw-r--r--src/pycrypto_compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pycrypto_compat.h b/src/pycrypto_compat.h
index 3e8f92d..4f75273 100644
--- a/src/pycrypto_compat.h
+++ b/src/pycrypto_compat.h
@@ -31,6 +31,8 @@
#if PY_MAJOR_VERSION >= 3
# define IS_PY3K
+# define PyInt_AS_LONG PyLong_AS_LONG
+# define PyInt_CheckExact PyLong_CheckExact
# define PyInt_FromLong PyLong_FromLong
# define staticforward static
#else
@@ -49,6 +51,7 @@
# endif
# if PY_MINOR_VERSION <= 1 /* Python 2.1 only */
# define METH_O METH_OLDARGS /* METH_O is a subset of what METH_OLDARGS provides */
+# define PyInt_CheckExact PyInt_Check
# endif
#endif