Skip to content

gh-111178: Fix function signatures for test_os #131227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Modules/_queuemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 5 additions & 3 deletions Objects/structseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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.")},
Expand Down
Loading