mirror of
https://github.com/python/cpython.git
synced 2026-02-18 13:20:48 +00:00
bpo-44206: Add a version number to dictionary keys (GH-26333)
* Store log2(size) instead of size in dict-keys. * Use enum instead of function pointer to record kind of keys. * Add version number to dict keys.
This commit is contained in:
parent
8994e9c2cd
commit
f8a95df84b
7 changed files with 223 additions and 317 deletions
|
|
@ -82,3 +82,7 @@ typedef struct {
|
|||
|
||||
PyAPI_FUNC(PyObject *) _PyDictView_New(PyObject *, PyTypeObject *);
|
||||
PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
|
||||
|
||||
/* Gets a version number unique to the current state of the keys of dict, if possible.
|
||||
* Returns the version number, or zero if it was not possible to get a version number. */
|
||||
uint32_t _PyDictKeys_GetVersionForCurrentState(PyDictObject *dict);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue