summaryrefslogtreecommitdiffstats
path: root/Python/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/hashtable.c')
-rw-r--r--Python/hashtable.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/hashtable.c b/Python/hashtable.c
index 22b8459..e9f02d8 100644
--- a/Python/hashtable.c
+++ b/Python/hashtable.c
@@ -149,11 +149,12 @@ _Py_hashtable_new_full(size_t key_size, size_t data_size,
_Py_hashtable_allocator_t alloc;
if (allocator == NULL) {
- alloc.malloc = PyMem_RawMalloc;
- alloc.free = PyMem_RawFree;
+ alloc.malloc = PyMem_Malloc;
+ alloc.free = PyMem_Free;
}
- else
+ else {
alloc = *allocator;
+ }
ht = (_Py_hashtable_t *)alloc.malloc(sizeof(_Py_hashtable_t));
if (ht == NULL)