summaryrefslogtreecommitdiff
path: root/src/block_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/block_template.c')
-rw-r--r--src/block_template.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/block_template.c b/src/block_template.c
index e1f3f2f..0e7442a 100644
--- a/src/block_template.c
+++ b/src/block_template.c
@@ -75,7 +75,6 @@ static PyTypeObject ALGtype;
#else
staticforward PyTypeObject ALGtype;
#define is_ALGobject(v) ((v)->ob_type == &ALGtype)
-#define PyLong_FromLong PyInt_FromLong /* For Python 2.x */
#endif
static ALGobject *
@@ -668,7 +667,7 @@ ALGgetattr(PyObject *s, char *name)
if (strcmp(name, "mode") == 0)
#endif
{
- return(PyLong_FromLong((long)(self->mode)));
+ return(PyInt_FromLong((long)(self->mode)));
}
#ifdef IS_PY3K
if (PyUnicode_CompareWithASCIIString(attr, "block_size") == 0)
@@ -676,7 +675,7 @@ ALGgetattr(PyObject *s, char *name)
if (strcmp(name, "block_size") == 0)
#endif
{
- return PyLong_FromLong(BLOCK_SIZE);
+ return PyInt_FromLong(BLOCK_SIZE);
}
#ifdef IS_PY3K
if (PyUnicode_CompareWithASCIIString(attr, "key_size") == 0)
@@ -684,7 +683,7 @@ ALGgetattr(PyObject *s, char *name)
if (strcmp(name, "key_size") == 0)
#endif
{
- return PyLong_FromLong(KEY_SIZE);
+ return PyInt_FromLong(KEY_SIZE);
}
#ifdef IS_PY3K
generic: