summaryrefslogtreecommitdiffstats
path: root/Python/_warnings.c
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2022-10-09 11:16:33 (GMT)
committerGitHub <noreply@github.com>2022-10-09 11:16:33 (GMT)
commita04656ec32bd5f3684ea18b195f76000df4962eb (patch)
tree3bdc436cdaf14ee1d4c605d2e186f685966e4d60 /Python/_warnings.c
parent2d2e01aa4cb72db8dabcd04e87f1e60b3597267e (diff)
downloadcpython-a04656ec32bd5f3684ea18b195f76000df4962eb.zip
cpython-a04656ec32bd5f3684ea18b195f76000df4962eb.tar.gz
cpython-a04656ec32bd5f3684ea18b195f76000df4962eb.tar.bz2
gh-97841: Add methoddef for _filters_mutated (gh-98115)
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 0d4c50f..b46fbdc 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -1086,8 +1086,14 @@ warnings_warn_explicit_impl(PyObject *module, PyObject *message,
return returned;
}
+/*[clinic input]
+_filters_mutated as warnings_filters_mutated
+
+[clinic start generated code]*/
+
static PyObject *
-warnings_filters_mutated(PyObject *self, PyObject *Py_UNUSED(args))
+warnings_filters_mutated_impl(PyObject *module)
+/*[clinic end generated code: output=8ce517abd12b88f4 input=35ecbf08ee2491b2]*/
{
PyInterpreterState *interp = get_current_interp();
if (interp == NULL) {
@@ -1344,8 +1350,7 @@ _PyErr_WarnUnawaitedCoroutine(PyObject *coro)
static PyMethodDef warnings_functions[] = {
WARNINGS_WARN_METHODDEF
WARNINGS_WARN_EXPLICIT_METHODDEF
- {"_filters_mutated", _PyCFunction_CAST(warnings_filters_mutated), METH_NOARGS,
- NULL},
+ WARNINGS_FILTERS_MUTATED_METHODDEF
/* XXX(brett.cannon): add showwarning? */
/* XXX(brett.cannon): Reasonable to add formatwarning? */
{NULL, NULL} /* sentinel */