mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)
Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
This commit is contained in:
parent
c278474df9
commit
b270b82f11
99 changed files with 978 additions and 975 deletions
|
|
@ -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]*/
|
||||
|
|
|
|||
6
Modules/_multiprocessing/clinic/posixshmem.c.h
generated
6
Modules/_multiprocessing/clinic/posixshmem.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
10
Modules/_multiprocessing/clinic/semaphore.c.h
generated
10
Modules/_multiprocessing/clinic/semaphore.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue