diff --git a/path.c b/path.c index 622edb10a..0d9fadb8e 100644 --- a/path.c +++ b/path.c @@ -539,7 +539,7 @@ static struct PyMethodDef methods[] = { static PyObject* path_getattr_id(PyPathObject* self, void* closure) { - return Py_BuildValue("l", (long) self->xy); + return Py_BuildValue("n", (Py_ssize_t) self->xy); } static struct PyGetSetDef getsetters[] = {