mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Cleanup hashtable.h
Issue #26588: * Pass the hash table rather than the key size to hash and compare functions * _Py_HASHTABLE_READ_KEY() and _Py_HASHTABLE_ENTRY_READ_KEY() macros now expect the hash table as the first parameter, rather than the key size * tracemalloc_get_traces_fill(): use _Py_HASHTABLE_ENTRY_READ_DATA() rather than pointer dereference * Remove the _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Move "PKEY" and "PDATA" macros inside hashtable.c
This commit is contained in:
parent
ca79ccd9e6
commit
5dacbd4c42
4 changed files with 82 additions and 81 deletions
|
@ -588,7 +588,7 @@ w_decref_entry(_Py_hashtable_t *ht, _Py_hashtable_entry_t *entry,
|
|||
{
|
||||
PyObject *entry_key;
|
||||
|
||||
_Py_HASHTABLE_ENTRY_READ_KEY(ht->key_size, entry, entry_key);
|
||||
_Py_HASHTABLE_ENTRY_READ_KEY(ht, entry, entry_key);
|
||||
Py_XDECREF(entry_key);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue