diff --git a/pyspamsum.c b/pyspamsum.c index bcc4ad7..4eb5b0b 100644 --- a/pyspamsum.c +++ b/pyspamsum.c @@ -7,6 +7,8 @@ * Copyright 2009 Russell Keith-Magee */ +#define PY_SSIZE_T_CLEAN + #include #include #include @@ -33,7 +35,7 @@ PyObject *py_edit_distance(PyObject *self, PyObject *args) int distance; char *from, *to; - int from_len, to_len; + Py_ssize_t from_len, to_len; if (!PyArg_ParseTuple(args, "s#s#", &from, &from_len, &to, &to_len)) { @@ -53,7 +55,7 @@ PyObject *py_spamsum(PyObject *self, PyObject *args) char *sum; unsigned char *in; - unsigned int length; + Py_ssize_t length; unsigned int flags, bsize; flags = 0; diff --git a/setup.py b/setup.py index 44d3d1c..a7da0c1 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ with io.open('README.rst', encoding='utf8') as readme: setup( name="pyspamsum", - version="1.0.4", + version="1.0.5", description="A Python wrapper for Andrew Tridgell's spamsum algorithm", long_description=long_description, author="Russell Keith-Magee", @@ -27,6 +27,9 @@ setup( 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Text Processing', 'Topic :: Utilities', ],