Skip to content

Commit a04656e

Browse files
authored
pythongh-97841: Add methoddef for _filters_mutated (pythongh-98115)
1 parent 2d2e01a commit a04656e

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

Python/_warnings.c

+8-3
Original file line numberDiff line numberDiff line change
@@ -1086,8 +1086,14 @@ warnings_warn_explicit_impl(PyObject *module, PyObject *message,
10861086
return returned;
10871087
}
10881088

1089+
/*[clinic input]
1090+
_filters_mutated as warnings_filters_mutated
1091+
1092+
[clinic start generated code]*/
1093+
10891094
static PyObject *
1090-
warnings_filters_mutated(PyObject *self, PyObject *Py_UNUSED(args))
1095+
warnings_filters_mutated_impl(PyObject *module)
1096+
/*[clinic end generated code: output=8ce517abd12b88f4 input=35ecbf08ee2491b2]*/
10911097
{
10921098
PyInterpreterState *interp = get_current_interp();
10931099
if (interp == NULL) {
@@ -1344,8 +1350,7 @@ _PyErr_WarnUnawaitedCoroutine(PyObject *coro)
13441350
static PyMethodDef warnings_functions[] = {
13451351
WARNINGS_WARN_METHODDEF
13461352
WARNINGS_WARN_EXPLICIT_METHODDEF
1347-
{"_filters_mutated", _PyCFunction_CAST(warnings_filters_mutated), METH_NOARGS,
1348-
NULL},
1353+
WARNINGS_FILTERS_MUTATED_METHODDEF
13491354
/* XXX(brett.cannon): add showwarning? */
13501355
/* XXX(brett.cannon): Reasonable to add formatwarning? */
13511356
{NULL, NULL} /* sentinel */

Python/clinic/_warnings.c.h

+18-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)