diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-03 18:25:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 18:25:41 (GMT) |
commit | b270b82f1137ff25ee263eafd31503d760f3403d (patch) | |
tree | 09a2ae5d93d47aa51f831f9fc906215095172667 /Modules/_multiprocessing | |
parent | c278474df97de310535425c207136bf26c663e0b (diff) | |
download | cpython-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 'Modules/_multiprocessing')
-rw-r--r-- | Modules/_multiprocessing/clinic/multiprocessing.c.h | 6 | ||||
-rw-r--r-- | Modules/_multiprocessing/clinic/posixshmem.c.h | 6 | ||||
-rw-r--r-- | Modules/_multiprocessing/clinic/semaphore.c.h | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/Modules/_multiprocessing/clinic/multiprocessing.c.h b/Modules/_multiprocessing/clinic/multiprocessing.c.h index 7096442..e995321 100644 --- a/Modules/_multiprocessing/clinic/multiprocessing.c.h +++ b/Modules/_multiprocessing/clinic/multiprocessing.c.h @@ -40,7 +40,7 @@ PyDoc_STRVAR(_multiprocessing_recv__doc__, "\n"); #define _MULTIPROCESSING_RECV_METHODDEF \ - {"recv", (PyCFunction)(void(*)(void))_multiprocessing_recv, METH_FASTCALL, _multiprocessing_recv__doc__}, + {"recv", _PyCFunction_CAST(_multiprocessing_recv), METH_FASTCALL, _multiprocessing_recv__doc__}, static PyObject * _multiprocessing_recv_impl(PyObject *module, HANDLE handle, int size); @@ -72,7 +72,7 @@ PyDoc_STRVAR(_multiprocessing_send__doc__, "\n"); #define _MULTIPROCESSING_SEND_METHODDEF \ - {"send", (PyCFunction)(void(*)(void))_multiprocessing_send, METH_FASTCALL, _multiprocessing_send__doc__}, + {"send", _PyCFunction_CAST(_multiprocessing_send), METH_FASTCALL, _multiprocessing_send__doc__}, static PyObject * _multiprocessing_send_impl(PyObject *module, HANDLE handle, Py_buffer *buf); @@ -148,4 +148,4 @@ exit: #ifndef _MULTIPROCESSING_SEND_METHODDEF #define _MULTIPROCESSING_SEND_METHODDEF #endif /* !defined(_MULTIPROCESSING_SEND_METHODDEF) */ -/*[clinic end generated code: output=418191c446cd5751 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d3bbf69de578db7b input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index 3424b10..be21f83 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -11,7 +11,7 @@ PyDoc_STRVAR(_posixshmem_shm_open__doc__, "Open a shared memory object. Returns a file descriptor (integer)."); #define _POSIXSHMEM_SHM_OPEN_METHODDEF \ - {"shm_open", (PyCFunction)(void(*)(void))_posixshmem_shm_open, METH_FASTCALL|METH_KEYWORDS, _posixshmem_shm_open__doc__}, + {"shm_open", _PyCFunction_CAST(_posixshmem_shm_open), METH_FASTCALL|METH_KEYWORDS, _posixshmem_shm_open__doc__}, static int _posixshmem_shm_open_impl(PyObject *module, PyObject *path, int flags, @@ -79,7 +79,7 @@ PyDoc_STRVAR(_posixshmem_shm_unlink__doc__, "region."); #define _POSIXSHMEM_SHM_UNLINK_METHODDEF \ - {"shm_unlink", (PyCFunction)(void(*)(void))_posixshmem_shm_unlink, METH_FASTCALL|METH_KEYWORDS, _posixshmem_shm_unlink__doc__}, + {"shm_unlink", _PyCFunction_CAST(_posixshmem_shm_unlink), METH_FASTCALL|METH_KEYWORDS, _posixshmem_shm_unlink__doc__}, static PyObject * _posixshmem_shm_unlink_impl(PyObject *module, PyObject *path); @@ -120,4 +120,4 @@ exit: #ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF #define _POSIXSHMEM_SHM_UNLINK_METHODDEF #endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */ -/*[clinic end generated code: output=bca8e78d0f43ef1a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a6db931a47d36e1b input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index 018447a..adb4747 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -11,7 +11,7 @@ PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, "Acquire the semaphore/lock."); #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \ - {"acquire", (PyCFunction)(void(*)(void))_multiprocessing_SemLock_acquire, METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, + {"acquire", _PyCFunction_CAST(_multiprocessing_SemLock_acquire), METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, static PyObject * _multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, @@ -85,7 +85,7 @@ PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, "Acquire the semaphore/lock."); #define _MULTIPROCESSING_SEMLOCK_ACQUIRE_METHODDEF \ - {"acquire", (PyCFunction)(void(*)(void))_multiprocessing_SemLock_acquire, METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, + {"acquire", _PyCFunction_CAST(_multiprocessing_SemLock_acquire), METH_FASTCALL|METH_KEYWORDS, _multiprocessing_SemLock_acquire__doc__}, static PyObject * _multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, @@ -220,7 +220,7 @@ PyDoc_STRVAR(_multiprocessing_SemLock__rebuild__doc__, "\n"); #define _MULTIPROCESSING_SEMLOCK__REBUILD_METHODDEF \ - {"_rebuild", (PyCFunction)(void(*)(void))_multiprocessing_SemLock__rebuild, METH_FASTCALL|METH_CLASS, _multiprocessing_SemLock__rebuild__doc__}, + {"_rebuild", _PyCFunction_CAST(_multiprocessing_SemLock__rebuild), METH_FASTCALL|METH_CLASS, _multiprocessing_SemLock__rebuild__doc__}, static PyObject * _multiprocessing_SemLock__rebuild_impl(PyTypeObject *type, SEM_HANDLE handle, @@ -389,7 +389,7 @@ PyDoc_STRVAR(_multiprocessing_SemLock___exit____doc__, "Exit the semaphore/lock."); #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF \ - {"__exit__", (PyCFunction)(void(*)(void))_multiprocessing_SemLock___exit__, METH_FASTCALL, _multiprocessing_SemLock___exit____doc__}, + {"__exit__", _PyCFunction_CAST(_multiprocessing_SemLock___exit__), METH_FASTCALL, _multiprocessing_SemLock___exit____doc__}, static PyObject * _multiprocessing_SemLock___exit___impl(SemLockObject *self, @@ -467,4 +467,4 @@ exit: #ifndef _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #define _MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF #endif /* !defined(_MULTIPROCESSING_SEMLOCK___EXIT___METHODDEF) */ -/*[clinic end generated code: output=fde05a081b5bdba4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=64ba32544811c9e6 input=a9049054013a1b77]*/ |