Skip to content

Commit 1485323

Browse files
committed
pythongh-111178: Fix function signatures for test_os
1 parent c497f83 commit 1485323

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Modules/_queuemodule.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ typedef struct {
272272
} HandoffData;
273273

274274
static void
275-
maybe_handoff_item(HandoffData *data, PyObject **item, int has_more_waiters)
275+
maybe_handoff_item(void *arg, void *park_arg, int has_more_waiters)
276276
{
277+
HandoffData *data = (HandoffData*)arg;
278+
PyObject **item = (PyObject**)park_arg;
277279
if (item == NULL) {
278280
// No threads were waiting
279281
data->handed_off = false;

Modules/socketmodule.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1731,8 +1731,9 @@ idna_cleanup(struct maybe_idna *data)
17311731
}
17321732

17331733
static int
1734-
idna_converter(PyObject *obj, struct maybe_idna *data)
1734+
idna_converter(PyObject *obj, void *arg)
17351735
{
1736+
struct maybe_idna *data = (struct maybe_idna*)arg;
17361737
size_t len;
17371738
PyObject *obj2;
17381739
if (obj == NULL) {

Objects/structseq.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ structseq_repr(PyObject *op)
334334

335335

336336
static PyObject *
337-
structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
337+
structseq_reduce(PyObject *op, PyObject *Py_UNUSED(ignored))
338338
{
339+
PyStructSequence *self = (PyStructSequence*)op;
339340
PyObject* tup = NULL;
340341
PyObject* dict = NULL;
341342
PyObject* result;
@@ -379,8 +380,9 @@ structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored))
379380

380381

381382
static PyObject *
382-
structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
383+
structseq_replace(PyObject *op, PyObject *args, PyObject *kwargs)
383384
{
385+
PyStructSequence *self = (PyStructSequence*)op;
384386
PyStructSequence *result = NULL;
385387
Py_ssize_t n_fields, n_unnamed_fields, i;
386388

@@ -449,7 +451,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
449451
}
450452

451453
static PyMethodDef structseq_methods[] = {
452-
{"__reduce__", (PyCFunction)structseq_reduce, METH_NOARGS, NULL},
454+
{"__reduce__", structseq_reduce, METH_NOARGS, NULL},
453455
{"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS,
454456
PyDoc_STR("__replace__($self, /, **changes)\n--\n\n"
455457
"Return a copy of the structure with new values for the specified fields.")},

0 commit comments

Comments
 (0)