diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-07-25 22:05:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 22:05:27 (GMT) |
commit | 7f731943393d57cf26ed5f2353e6e53084cd55fd (patch) | |
tree | c8c8abdbf76cf74188d0dd7f7c775660007826c7 /Modules | |
parent | 4c10dbab4e677a2aa2e37211d418293a542c3bc4 (diff) | |
download | cpython-7f731943393d57cf26ed5f2353e6e53084cd55fd.zip cpython-7f731943393d57cf26ed5f2353e6e53084cd55fd.tar.gz cpython-7f731943393d57cf26ed5f2353e6e53084cd55fd.tar.bz2 |
[3.11] GH-92678: Expose managed dict clear and visit functions (GH-95246). (#95256)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_testcapimodule.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 9aa7fca..9022ee4 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -6014,6 +6014,14 @@ 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 *negative_dictoffset(PyObject *, PyObject *); static PyObject *test_buildvalue_issue38913(PyObject *, PyObject *); static PyObject *getargs_s_hash_int(PyObject *, PyObject *, PyObject*); @@ -6315,6 +6323,7 @@ static PyMethodDef TestMethods[] = { {"get_feature_macros", get_feature_macros, METH_NOARGS, NULL}, {"test_code_api", test_code_api, METH_NOARGS, NULL}, {"settrace_to_record", settrace_to_record, METH_O, NULL}, + {"clear_managed_dict", clear_managed_dict, METH_O, NULL}, {NULL, NULL} /* sentinel */ }; |