Merge pull request #2 from CSIS/master

Add support for python 3.9
This commit is contained in:
Russell Keith-Magee 2020-10-17 08:51:46 +08:00 committed by GitHub
commit 58e7a9852b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -7,6 +7,8 @@
* Copyright 2009 Russell Keith-Magee <russell@keith-magee.com>
*/
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <sys/types.h>
#include <stdio.h>
@ -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;

View file

@ -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',
],