mirror of https://github.com/python/cpython.git
Use Py_ssize_t for PySet_Size() like all the other Py*_Size() functions.
This commit is contained in:
parent
b62c433d71
commit
8c49c82889
|
@ -76,7 +76,7 @@ PyAPI_DATA(PyTypeObject) PyFrozenSet_Type;
|
|||
|
||||
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);
|
||||
|
|
|
@ -1958,7 +1958,7 @@ PyFrozenSet_New(PyObject *iterable)
|
|||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
Py_ssize_t
|
||||
PySet_Size(PyObject *anyset)
|
||||
{
|
||||
if (!PyAnySet_Check(anyset)) {
|
||||
|
|
Loading…
Reference in New Issue