gh-111178: Fix function signatures for test_ctypes (#131660)

This commit is contained in:
Victor Stinner 2025-03-24 14:30:13 +01:00 committed by GitHub
parent 0e53038ea8
commit abcd9d4f7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

@ -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.

View file

@ -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;
}

View file

@ -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);