https://github.com/python/cpython/commit/abcd9d4f7dcd804ae97821166f0d4e8c08c07972 commit: abcd9d4f7dcd804ae97821166f0d4e8c08c07972 branch: main author: Victor Stinner <vstin...@python.org> committer: vstinner <vstin...@python.org> date: 2025-03-24T14:30:13+01:00 summary:
gh-111178: Fix function signatures for test_ctypes (#131660) files: M Modules/_ctypes/_ctypes.c M Modules/_ctypes/callproc.c M Modules/_ctypes/cfield.c diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 2c2d09625a9825..6d817bdaecfa4e 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -3805,8 +3805,9 @@ _validate_paramflags(ctypes_state *st, PyTypeObject *type, PyObject *paramflags) } static int -_get_name(PyObject *obj, const char **pname) +_get_name(PyObject *obj, void *arg) { + const char **pname = (const char **)arg; #ifdef MS_WIN32 if (PyLong_Check(obj)) { /* We have to use MAKEINTRESOURCEA for Windows CE. diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index c652634a137431..80b66afb3625d1 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -1353,8 +1353,9 @@ PyObject *_ctypes_callproc(ctypes_state *st, } static int -_parse_voidp(PyObject *obj, void **address) +_parse_voidp(PyObject *obj, void *arg) { + void **address = (void **)arg; *address = PyLong_AsVoidPtr(obj); if (*address == NULL) return 0; @@ -1846,8 +1847,9 @@ addressof(PyObject *self, PyObject *obj) } static int -converter(PyObject *obj, void **address) +converter(PyObject *obj, void *arg) { + void **address = (void **)arg; *address = PyLong_AsVoidPtr(obj); return *address != NULL; } diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index 7086ba2010607d..fe0839a809f8db 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -266,7 +266,7 @@ PyCField_set(PyObject *op, PyObject *inst, PyObject *value) } static PyObject * -PyCField_get(PyObject *op, PyObject *inst, PyTypeObject *type) +PyCField_get(PyObject *op, PyObject *inst, PyObject *type) { CDataObject *src; CFieldObject *self = _CFieldObject_CAST(op); _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com