summaryrefslogtreecommitdiffstats
path: root/PC/clinic/msvcrtmodule.c.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-03 18:25:41 (GMT)
committerGitHub <noreply@github.com>2022-05-03 18:25:41 (GMT)
commitb270b82f1137ff25ee263eafd31503d760f3403d (patch)
tree09a2ae5d93d47aa51f831f9fc906215095172667 /PC/clinic/msvcrtmodule.c.h
parentc278474df97de310535425c207136bf26c663e0b (diff)
downloadcpython-b270b82f1137ff25ee263eafd31503d760f3403d.zip
cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.gz
cpython-b270b82f1137ff25ee263eafd31503d760f3403d.tar.bz2
gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)
Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
Diffstat (limited to 'PC/clinic/msvcrtmodule.c.h')
-rw-r--r--PC/clinic/msvcrtmodule.c.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h
index 1ac82cb..ea95897 100644
--- a/PC/clinic/msvcrtmodule.c.h
+++ b/PC/clinic/msvcrtmodule.c.h
@@ -37,7 +37,7 @@ PyDoc_STRVAR(msvcrt_locking__doc__,
"individually.");
#define MSVCRT_LOCKING_METHODDEF \
- {"locking", (PyCFunction)(void(*)(void))msvcrt_locking, METH_FASTCALL, msvcrt_locking__doc__},
+ {"locking", _PyCFunction_CAST(msvcrt_locking), METH_FASTCALL, msvcrt_locking__doc__},
static PyObject *
msvcrt_locking_impl(PyObject *module, int fd, int mode, long nbytes);
@@ -83,7 +83,7 @@ PyDoc_STRVAR(msvcrt_setmode__doc__,
"Return value is the previous mode.");
#define MSVCRT_SETMODE_METHODDEF \
- {"setmode", (PyCFunction)(void(*)(void))msvcrt_setmode, METH_FASTCALL, msvcrt_setmode__doc__},
+ {"setmode", _PyCFunction_CAST(msvcrt_setmode), METH_FASTCALL, msvcrt_setmode__doc__},
static long
msvcrt_setmode_impl(PyObject *module, int fd, int flags);
@@ -128,7 +128,7 @@ PyDoc_STRVAR(msvcrt_open_osfhandle__doc__,
"to os.fdopen() to create a file object.");
#define MSVCRT_OPEN_OSFHANDLE_METHODDEF \
- {"open_osfhandle", (PyCFunction)(void(*)(void))msvcrt_open_osfhandle, METH_FASTCALL, msvcrt_open_osfhandle__doc__},
+ {"open_osfhandle", _PyCFunction_CAST(msvcrt_open_osfhandle), METH_FASTCALL, msvcrt_open_osfhandle__doc__},
static long
msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags);
@@ -475,7 +475,7 @@ PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__,
"Only available on Debug builds.");
#define MSVCRT_CRTSETREPORTFILE_METHODDEF \
- {"CrtSetReportFile", (PyCFunction)(void(*)(void))msvcrt_CrtSetReportFile, METH_FASTCALL, msvcrt_CrtSetReportFile__doc__},
+ {"CrtSetReportFile", _PyCFunction_CAST(msvcrt_CrtSetReportFile), METH_FASTCALL, msvcrt_CrtSetReportFile__doc__},
static void *
msvcrt_CrtSetReportFile_impl(PyObject *module, int type, void *file);
@@ -515,7 +515,7 @@ PyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__,
"Only available on Debug builds.");
#define MSVCRT_CRTSETREPORTMODE_METHODDEF \
- {"CrtSetReportMode", (PyCFunction)(void(*)(void))msvcrt_CrtSetReportMode, METH_FASTCALL, msvcrt_CrtSetReportMode__doc__},
+ {"CrtSetReportMode", _PyCFunction_CAST(msvcrt_CrtSetReportMode), METH_FASTCALL, msvcrt_CrtSetReportMode__doc__},
static long
msvcrt_CrtSetReportMode_impl(PyObject *module, int type, int mode);
@@ -647,4 +647,4 @@ exit:
#ifndef MSVCRT_SET_ERROR_MODE_METHODDEF
#define MSVCRT_SET_ERROR_MODE_METHODDEF
#endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */
-/*[clinic end generated code: output=20dfbc768edce7c0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b543933cad520f2b input=a9049054013a1b77]*/