https://github.com/python/cpython/commit/db62557e3d1b0de4ca17786bd53f9c825ad88721 commit: db62557e3d1b0de4ca17786bd53f9c825ad88721 branch: main author: Victor Stinner <vstin...@python.org> committer: vstinner <vstin...@python.org> date: 2025-03-14T13:53:06Z summary:
gh-111178: Fix function signatures for test_os (#131227) files: M Modules/_queuemodule.c M Modules/socketmodule.c M Objects/structseq.c diff --git a/Modules/_queuemodule.c b/Modules/_queuemodule.c index 4233ac5736c61e..3ee14b61b821d6 100644 --- a/Modules/_queuemodule.c +++ b/Modules/_queuemodule.c @@ -272,8 +272,10 @@ typedef struct { } HandoffData; static void -maybe_handoff_item(HandoffData *data, PyObject **item, int has_more_waiters) +maybe_handoff_item(void *arg, void *park_arg, int has_more_waiters) { + HandoffData *data = (HandoffData*)arg; + PyObject **item = (PyObject**)park_arg; if (item == NULL) { // No threads were waiting data->handed_off = false; @@ -313,7 +315,7 @@ _queue_SimpleQueue_put_impl(simplequeueobject *self, PyObject *item, if (self->has_threads_waiting) { // Try to hand the item off directly if there are threads waiting _PyParkingLot_Unpark(&self->has_threads_waiting, - (_Py_unpark_fn_t *)maybe_handoff_item, &data); + maybe_handoff_item, &data); } if (!data.handed_off) { if (RingBuf_Put(&self->buf, item) < 0) { diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 9622dfed976dff..795451d48e7b35 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1731,8 +1731,9 @@ idna_cleanup(struct maybe_idna *data) } static int -idna_converter(PyObject *obj, struct maybe_idna *data) +idna_converter(PyObject *obj, void *arg) { + struct maybe_idna *data = (struct maybe_idna*)arg; size_t len; PyObject *obj2; if (obj == NULL) { diff --git a/Objects/structseq.c b/Objects/structseq.c index b62317e1cf3732..b7741209df9264 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -334,8 +334,9 @@ structseq_repr(PyObject *op) static PyObject * -structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored)) +structseq_reduce(PyObject *op, PyObject *Py_UNUSED(ignored)) { + PyStructSequence *self = (PyStructSequence*)op; PyObject* tup = NULL; PyObject* dict = NULL; PyObject* result; @@ -379,8 +380,9 @@ structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored)) static PyObject * -structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs) +structseq_replace(PyObject *op, PyObject *args, PyObject *kwargs) { + PyStructSequence *self = (PyStructSequence*)op; PyStructSequence *result = NULL; Py_ssize_t n_fields, n_unnamed_fields, i; @@ -449,7 +451,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs) } static PyMethodDef structseq_methods[] = { - {"__reduce__", (PyCFunction)structseq_reduce, METH_NOARGS, NULL}, + {"__reduce__", structseq_reduce, METH_NOARGS, NULL}, {"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS, PyDoc_STR("__replace__($self, /, **changes)\n--\n\n" "Return a copy of the structure with new values for the specified fields.")}, _______________________________________________ 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