Use Py_ssize_t for PySet_Size() like all the other Py*_Size() functions.
diff --git a/Include/setobject.h b/Include/setobject.h
index 1b0e5b1..cea95cc 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -76,7 +76,7 @@
PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
-PyAPI_FUNC(int) PySet_Size(PyObject *anyset);
+PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 0041a10..ed3d190 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1958,7 +1958,7 @@
return result;
}
-int
+Py_ssize_t
PySet_Size(PyObject *anyset)
{
if (!PyAnySet_Check(anyset)) {