gh-97841: Add methoddef for _filters_mutated (gh-98115)

This commit is contained in:
Dong-hee Na 2022-10-09 20:16:33 +09:00 committed by GitHub
parent 2d2e01aa4c
commit a04656ec32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 4 deletions

View file

@ -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 */