|
13 | 13 | #include "pycore_atomic_funcs.h" // _Py_atomic_int_get()
|
14 | 14 | #include "pycore_bitutils.h" // _Py_bswap32()
|
15 | 15 | #include "pycore_bytesobject.h" // _PyBytes_Find()
|
16 |
| -#include "pycore_compile.h" // _PyCompile_CodeGen, _PyCompile_OptimizeCfg, _PyCompile_Assemble, _PyCompile_CleanDoc |
17 | 16 | #include "pycore_ceval.h" // _PyEval_AddPendingCall()
|
| 17 | +#include "pycore_compile.h" // _PyCompile_CodeGen() |
| 18 | +#include "pycore_context.h" // _PyContext_NewHamtForTests() |
18 | 19 | #include "pycore_dict.h" // _PyDictOrValues_GetValues()
|
19 | 20 | #include "pycore_fileutils.h" // _Py_normpath()
|
20 | 21 | #include "pycore_frame.h" // _PyInterpreterFrame
|
@@ -1564,6 +1565,13 @@ get_object_dict_values(PyObject *self, PyObject *obj)
|
1564 | 1565 | }
|
1565 | 1566 |
|
1566 | 1567 |
|
| 1568 | +static PyObject* |
| 1569 | +new_hamt(PyObject *self, PyObject *args) |
| 1570 | +{ |
| 1571 | + return _PyContext_NewHamtForTests(); |
| 1572 | +} |
| 1573 | + |
| 1574 | + |
1567 | 1575 | static PyMethodDef module_functions[] = {
|
1568 | 1576 | {"get_configs", get_configs, METH_NOARGS},
|
1569 | 1577 | {"get_recursion_depth", get_recursion_depth, METH_NOARGS},
|
@@ -1628,6 +1636,7 @@ static PyMethodDef module_functions[] = {
|
1628 | 1636 | check_pyobject_uninitialized_is_freed, METH_NOARGS},
|
1629 | 1637 | {"pymem_getallocatorsname", test_pymem_getallocatorsname, METH_NOARGS},
|
1630 | 1638 | {"get_object_dict_values", get_object_dict_values, METH_O},
|
| 1639 | + {"hamt", new_hamt, METH_NOARGS}, |
1631 | 1640 | {NULL, NULL} /* sentinel */
|
1632 | 1641 | };
|
1633 | 1642 |
|
|
0 commit comments