summaryrefslogtreecommitdiffstats
path: root/Python/clinic
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2024-02-12 09:04:36 (GMT)
committerGitHub <noreply@github.com>2024-02-12 09:04:36 (GMT)
commit235cacff81931a68e8c400bb3919ae6e55462fb5 (patch)
tree2f4c7d4a8d0f2e0bbdad8e28560609a2aab27bf5 /Python/clinic
parent54bde5dcc3c04c4ddebcc9df2904ab325fa0b486 (diff)
downloadcpython-235cacff81931a68e8c400bb3919ae6e55462fb5.zip
cpython-235cacff81931a68e8c400bb3919ae6e55462fb5.tar.gz
cpython-235cacff81931a68e8c400bb3919ae6e55462fb5.tar.bz2
GH-114695: Add `sys._clear_internal_caches` (GH-115152)
Diffstat (limited to 'Python/clinic')
-rw-r--r--Python/clinic/sysmodule.c.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h
index 93b8385..13f4ea8 100644
--- a/Python/clinic/sysmodule.c.h
+++ b/Python/clinic/sysmodule.c.h
@@ -1131,6 +1131,24 @@ sys__clear_type_cache(PyObject *module, PyObject *Py_UNUSED(ignored))
return sys__clear_type_cache_impl(module);
}
+PyDoc_STRVAR(sys__clear_internal_caches__doc__,
+"_clear_internal_caches($module, /)\n"
+"--\n"
+"\n"
+"Clear all internal performance-related caches.");
+
+#define SYS__CLEAR_INTERNAL_CACHES_METHODDEF \
+ {"_clear_internal_caches", (PyCFunction)sys__clear_internal_caches, METH_NOARGS, sys__clear_internal_caches__doc__},
+
+static PyObject *
+sys__clear_internal_caches_impl(PyObject *module);
+
+static PyObject *
+sys__clear_internal_caches(PyObject *module, PyObject *Py_UNUSED(ignored))
+{
+ return sys__clear_internal_caches_impl(module);
+}
+
PyDoc_STRVAR(sys_is_finalizing__doc__,
"is_finalizing($module, /)\n"
"--\n"
@@ -1486,4 +1504,4 @@ exit:
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
#define SYS_GETANDROIDAPILEVEL_METHODDEF
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
-/*[clinic end generated code: output=3dc3b2cb0ce38ebb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b8b1c53e04c3b20c input=a9049054013a1b77]*/