diff options
author | Victor Stinner <vstinner@python.org> | 2022-03-31 08:02:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 08:02:34 (GMT) |
commit | f0bc69485677ae8973685866ada0982976d3878f (patch) | |
tree | 0d64ad8e39f8e7ad7835d87416b8f6bf9c3d4460 /Python/_warnings.c | |
parent | c14d7e4b816134b8e93ece4066a86d229631ce96 (diff) | |
download | cpython-f0bc69485677ae8973685866ada0982976d3878f.zip cpython-f0bc69485677ae8973685866ada0982976d3878f.tar.gz cpython-f0bc69485677ae8973685866ada0982976d3878f.tar.bz2 |
bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)
Use the macro in C files of the Python/ directory.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index be962e7..942308b 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -1078,7 +1078,7 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds) } static PyObject * -warnings_filters_mutated(PyObject *self, PyObject *args) +warnings_filters_mutated(PyObject *self, PyObject *Py_UNUSED(args)) { PyInterpreterState *interp = get_current_interp(); if (interp == NULL) { @@ -1353,9 +1353,9 @@ PyDoc_STRVAR(warn_explicit_doc, static PyMethodDef warnings_functions[] = { WARNINGS_WARN_METHODDEF - {"warn_explicit", (PyCFunction)(void(*)(void))warnings_warn_explicit, + {"warn_explicit", _PyCFunction_CAST(warnings_warn_explicit), METH_VARARGS | METH_KEYWORDS, warn_explicit_doc}, - {"_filters_mutated", (PyCFunction)warnings_filters_mutated, METH_NOARGS, + {"_filters_mutated", _PyCFunction_CAST(warnings_filters_mutated), METH_NOARGS, NULL}, /* XXX(brett.cannon): add showwarning? */ /* XXX(brett.cannon): Reasonable to add formatwarning? */ |