Commit 5b24c6fe authored by Marius Gedminas's avatar Marius Gedminas

Use Py_ssize_t for length arguments of PyObject_CallFunction

This API was introduced in Python 2.5 and the old one (using ints) has
been deprecated since Python 3.8.

See #108.
parent 0d12ebe6
......@@ -16,6 +16,7 @@ static char cPersistence_doc_string[] =
"\n"
"$Id$\n";
#define PY_SSIZE_T_CLEAN
#include "cPersistence.h"
#include "structmember.h"
......@@ -1268,9 +1269,9 @@ Per_get_mtime(cPersistentObject *self)
}
#ifdef PY3K
t = PyObject_CallFunction(TimeStamp, "y#", self->serial, 8);
t = PyObject_CallFunction(TimeStamp, "y#", self->serial, (Py_ssize_t)8);
#else
t = PyObject_CallFunction(TimeStamp, "s#", self->serial, 8);
t = PyObject_CallFunction(TimeStamp, "s#", self->serial, (Py_ssize_t)8);
#endif
if (!t)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment