diff options
author | Mark Shannon <mark@hotpy.org> | 2022-07-25 21:30:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 21:30:53 (GMT) |
commit | 27055d766ab0ee5ddcfbd1fb51fb47419af1ddba (patch) | |
tree | 0e9f2ca9f0a8eac1e354e357aa7cee4581578e1e /Modules | |
parent | 2d26449b06f310d72eb7df58a7133a16d47d30ed (diff) | |
download | cpython-27055d766ab0ee5ddcfbd1fb51fb47419af1ddba.zip cpython-27055d766ab0ee5ddcfbd1fb51fb47419af1ddba.tar.gz cpython-27055d766ab0ee5ddcfbd1fb51fb47419af1ddba.tar.bz2 |
GH-92678: Expose managed dict clear and visit functions (#95246)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 02635c4..b9f75d1 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -6009,6 +6009,13 @@ settrace_to_record(PyObject *self, PyObject *list) Py_RETURN_NONE; } +static PyObject * +clear_managed_dict(PyObject *self, PyObject *obj) +{ + _PyObject_ClearManagedDict(obj); + Py_RETURN_NONE; +} + static PyObject * test_macros(PyObject *self, PyObject *Py_UNUSED(args)) @@ -6347,6 +6354,7 @@ static PyMethodDef TestMethods[] = { {"test_code_api", test_code_api, METH_NOARGS, NULL}, {"settrace_to_record", settrace_to_record, METH_O, NULL}, {"test_macros", test_macros, METH_NOARGS, NULL}, + {"clear_managed_dict", clear_managed_dict, METH_O, NULL}, {NULL, NULL} /* sentinel */ }; |