diff --git a/setup.py b/setup.py index 57260a6..413e118 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ long_description = open(readmePath, "rt").read() setup(name='crc16', - version='0.1.1', + version='0.1.2', description='Library for calculating CRC16', author='Gennady Trafimenkov', author_email='gennady.trafimenkov@gmail.com', diff --git a/src/_crc16module.c b/src/_crc16module.c index 2df8283..979b898 100644 --- a/src/_crc16module.c +++ b/src/_crc16module.c @@ -19,6 +19,7 @@ * * **************************************************************************/ +#define PY_SSIZE_T_CLEAN #include /* table for calculating CRC @@ -91,7 +92,7 @@ static PyObject * _crc16_crc16xmodem(PyObject *self, PyObject *args) { const unsigned char* data; - int data_len; + Py_ssize_t data_len; unsigned int crc = 0; unsigned int result;