diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-01-27 13:05:09 +0000 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-01-27 13:05:09 +0000 |
commit | d45d8652710e51576367db00b226b8465e6c5ce6 (patch) | |
tree | eeb12605abc98507852e82848382c2e739991708 /Include/dictobject.h | |
parent | 6ccbbb38caa79f9eb9b93b5767f3787fc80cbac1 (diff) | |
parent | bbbab3c96168cea9f872f90da0a385b50f62ca70 (diff) | |
download | cpython-d45d8652710e51576367db00b226b8465e6c5ce6.tar.gz |
Closes #28784: Merged update from 3.6.
Diffstat (limited to 'Include/dictobject.h')
-rw-r--r-- | Include/dictobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index c4f2e2f5b3..08a9449925 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -108,6 +108,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); |