Skip to content

Commit bc44935

Browse files
vstinnermcepl
authored andcommitted
bpo-40602: Rename hashtable.h to pycore_hashtable.h (pythonGH-20044)
* Move Modules/hashtable.h to Include/internal/pycore_hashtable.h * Move Modules/hashtable.c to Python/hashtable.c * Python is now linked to hashtable.c. _tracemalloc is no longer linked to hashtable.c. Previously, marshal.c got hashtable.c via _tracemalloc.c which is built as a builtin module.
1 parent e5eee4b commit bc44935

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Modules/Setup.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ zipimport zipimport.c
135135
faulthandler faulthandler.c
136136

137137
# debug tool to trace memory blocks allocated by Python
138-
_tracemalloc _tracemalloc.c hashtable.c
138+
#
139+
# bpo-35053: The module must be builtin since _Py_NewReference()
140+
# can call _PyTraceMalloc_NewReference().
141+
_tracemalloc _tracemalloc.c
139142

140143
# The rest of the modules listed in this file are all commented out by
141144
# default. Usually they can be detected and built as dynamically

Modules/hashtable.c renamed to Python/hashtable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646

4747
#include "Python.h"
48-
#include "hashtable.h"
48+
#include "../Modules/hashtable.h"
4949

5050
#define HASHTABLE_MIN_SIZE 16
5151
#define HASHTABLE_HIGH 0.50

0 commit comments

Comments
 (0)