mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.
This commit is contained in:
parent
1d59a0aacf
commit
5ab81d787f
25 changed files with 61 additions and 80 deletions
|
@ -106,6 +106,8 @@ PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp);
|
|||
PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
|
||||
PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
|
||||
#ifndef Py_LIMITED_API
|
||||
/* Get the number of items of a dictionary. */
|
||||
#define PyDict_GET_SIZE(mp) (assert(PyDict_Check(mp)),((PyDictObject *)mp)->ma_used)
|
||||
PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, Py_hash_t hash);
|
||||
PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
|
||||
PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue