Skip to content

Commit abcd9d4

Browse files
authored
gh-111178: Fix function signatures for test_ctypes (#131660)
1 parent 0e53038 commit abcd9d4

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3805,8 +3805,9 @@ _validate_paramflags(ctypes_state *st, PyTypeObject *type, PyObject *paramflags)
38053805
}
38063806

38073807
static int
3808-
_get_name(PyObject *obj, const char **pname)
3808+
_get_name(PyObject *obj, void *arg)
38093809
{
3810+
const char **pname = (const char **)arg;
38103811
#ifdef MS_WIN32
38113812
if (PyLong_Check(obj)) {
38123813
/* We have to use MAKEINTRESOURCEA for Windows CE.

Modules/_ctypes/callproc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,8 +1353,9 @@ PyObject *_ctypes_callproc(ctypes_state *st,
13531353
}
13541354

13551355
static int
1356-
_parse_voidp(PyObject *obj, void **address)
1356+
_parse_voidp(PyObject *obj, void *arg)
13571357
{
1358+
void **address = (void **)arg;
13581359
*address = PyLong_AsVoidPtr(obj);
13591360
if (*address == NULL)
13601361
return 0;
@@ -1846,8 +1847,9 @@ addressof(PyObject *self, PyObject *obj)
18461847
}
18471848

18481849
static int
1849-
converter(PyObject *obj, void **address)
1850+
converter(PyObject *obj, void *arg)
18501851
{
1852+
void **address = (void **)arg;
18511853
*address = PyLong_AsVoidPtr(obj);
18521854
return *address != NULL;
18531855
}

Modules/_ctypes/cfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ PyCField_set(PyObject *op, PyObject *inst, PyObject *value)
266266
}
267267

268268
static PyObject *
269-
PyCField_get(PyObject *op, PyObject *inst, PyTypeObject *type)
269+
PyCField_get(PyObject *op, PyObject *inst, PyObject *type)
270270
{
271271
CDataObject *src;
272272
CFieldObject *self = _CFieldObject_CAST(op);

0 commit comments

Comments
 (0)