mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Use Py_ssize_t for PySet_Size() like all the other Py*_Size() functions.
This commit is contained in:
parent
b62c433d71
commit
8c49c82889
2 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ PyAPI_DATA(PyTypeObject) PyFrozenSet_Type;
|
||||||
|
|
||||||
PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
|
PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
|
||||||
PyAPI_FUNC(PyObject *) PyFrozenSet_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)
|
#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
|
||||||
PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
|
PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
|
||||||
PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
|
PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
|
||||||
|
|
|
@ -1958,7 +1958,7 @@ PyFrozenSet_New(PyObject *iterable)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
Py_ssize_t
|
||||||
PySet_Size(PyObject *anyset)
|
PySet_Size(PyObject *anyset)
|
||||||
{
|
{
|
||||||
if (!PyAnySet_Check(anyset)) {
|
if (!PyAnySet_Check(anyset)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue