summaryrefslogtreecommitdiffstats
path: root/Modules/hashtable.h
Commit message (Collapse)AuthorAgeFilesLines
* Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly ↵Christian Heimes2016-09-131-4/+4
| | | | optimize memcpy().
* Cleanup hashtable.hVictor Stinner2016-03-231-32/+24
| | | | | | | | | | | | 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
* Issue #26588:Victor Stinner2016-03-231-0/+3
| | | | | | | * Optimize tracemalloc_add_trace(): modify hashtable entry data (trace) if the memory block is already tracked, rather than trying to remove the old trace and then add a new trace. * Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
* Issue #26588:Victor Stinner2016-03-231-4/+23
| | | | | | | | * _Py_HASHTABLE_ENTRY_DATA: change type from "char *" to "const void *" * Add _Py_HASHTABLE_ENTRY_WRITE_PKEY() macro * Rename _Py_HASHTABLE_ENTRY_WRITE_DATA() macro to _Py_HASHTABLE_ENTRY_WRITE_PDATA() * Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
* Fix macros in hashtable.hVictor Stinner2016-03-221-2/+2
| | | | Add parenthesis.
* Remove _Py_hashtable_delete()Victor Stinner2016-03-221-8/+0
| | | | | | Issue #26588: Remove _Py_hashtable_delete() from hashtable.h since the function is not used. Keep the C code in hashtable.c as commented code if someone needs it later.
* Simplify implementation of hashtable.cVictor Stinner2016-03-221-13/+1
| | | | | | | | | | | Issue #26588: Remove copy_data, free_data and get_data_size callbacks from hashtable.h. These callbacks are not used in Python and makes the code more complex. Remove also the _Py_HASHTABLE_ENTRY_DATA_AS_VOID_P() macro which uses an unsafe pointer dereference (can cause memory alignment issue). Replace the macro usage with _Py_HASHTABLE_ENTRY_READ_DATA() which is implemented with the safe memcpy() function.
* hashtable.h now supports keys of any sizeVictor Stinner2016-03-211-38/+127
| | | | | | Issue #26588: hashtable.h now supports keys of any size, not only sizeof(void*). It allows to support key larger than sizeof(void*), but also to use less memory for key smaller than sizeof(void*).
* Ooops, revert changeset ea9efa06c137Victor Stinner2016-03-211-63/+26
| | | | | | | | | | | Change pushed by mistake, the patch is still under review :-/ """ _tracemalloc: add domain to trace keys * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces """
* _tracemalloc: add domain to trace keysVictor Stinner2016-03-181-26/+63
| | | | | * hashtable.h: key has now a variable size * _tracemalloc uses (pointer: void*, domain: unsigned int) as key for traces
* Issue #21036: Fix typo in macro nameVictor Stinner2014-03-241-3/+3
| | | | _PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
* Issue #18874: Implement the PEP 454 (tracemalloc)Victor Stinner2013-11-231-0/+128