mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Implement compact dict
Issue #27350: `dict` implementation is changed like PyPy. It is more compact and preserves insertion order. _PyDict_Dummy() function has been removed. Disable test_gdb: python-gdb.py is not updated yet to the new structure of compact dictionaries (issue #28023). Patch written by INADA Naoki.
This commit is contained in:
parent
d8b7770a0e
commit
742da040db
12 changed files with 793 additions and 569 deletions
|
@ -22,12 +22,6 @@ _Py_GetRefTotal(void)
|
|||
{
|
||||
PyObject *o;
|
||||
Py_ssize_t total = _Py_RefTotal;
|
||||
/* ignore the references to the dummy object of the dicts and sets
|
||||
because they are not reliable and not useful (now that the
|
||||
hash table code is well-tested) */
|
||||
o = _PyDict_Dummy();
|
||||
if (o != NULL)
|
||||
total -= o->ob_refcnt;
|
||||
o = _PySet_Dummy;
|
||||
if (o != NULL)
|
||||
total -= o->ob_refcnt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue