Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use 'dummy' for NOARGS method
  • Loading branch information
picnixz committed Feb 6, 2025
commit ec1e15d5636377000e198d7a8daf7d86ef88bed3
12 changes: 6 additions & 6 deletions Modules/_io/bufferedio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2379,28 +2379,28 @@ bufferedrwpair_write(PyObject *op, PyObject *args)
}

static PyObject *
bufferedrwpair_flush(PyObject *op, PyObject *Py_UNUSED(ignored))
bufferedrwpair_flush(PyObject *op, PyObject *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
return _forward_call(self->writer, &_Py_ID(flush), NULL);
}

static PyObject *
bufferedrwpair_readable(PyObject *op, PyObject *Py_UNUSED(ignored))
bufferedrwpair_readable(PyObject *op, PyObject *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
return _forward_call(self->reader, &_Py_ID(readable), NULL);
}

static PyObject *
bufferedrwpair_writable(PyObject *op, PyObject *Py_UNUSED(ignored))
bufferedrwpair_writable(PyObject *op, PyObject *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
return _forward_call(self->writer, &_Py_ID(writable), NULL);
}

static PyObject *
bufferedrwpair_close(PyObject *op, PyObject *Py_UNUSED(ignored))
bufferedrwpair_close(PyObject *op, PyObject *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
PyObject *exc = NULL;
Expand All @@ -2420,7 +2420,7 @@ bufferedrwpair_close(PyObject *op, PyObject *Py_UNUSED(ignored))
}

static PyObject *
bufferedrwpair_isatty(PyObject *op, PyObject *Py_UNUSED(ignored))
bufferedrwpair_isatty(PyObject *op, PyObject *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
PyObject *ret = _forward_call(self->writer, &_Py_ID(isatty), NULL);
Expand All @@ -2435,7 +2435,7 @@ bufferedrwpair_isatty(PyObject *op, PyObject *Py_UNUSED(ignored))
}

static PyObject *
bufferedrwpair_closed_get(PyObject *op, void *Py_UNUSED(context))
bufferedrwpair_closed_get(PyObject *op, void *Py_UNUSED(dummy))
{
rwpair *self = _rwpair_CAST(op);
if (self->writer == NULL) {
Expand Down
6 changes: 3 additions & 3 deletions Modules/_io/bytesio.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ write_bytes(bytesio *self, PyObject *b)
}

static PyObject *
bytesio_get_closed(PyObject *op, void *Py_UNUSED(ignored))
bytesio_get_closed(PyObject *op, void *Py_UNUSED(closure))
{
bytesio *self = _bytesio_CAST(op);
if (self->buf == NULL) {
Expand Down Expand Up @@ -789,7 +789,7 @@ _io_BytesIO_close_impl(bytesio *self)
*/

static PyObject *
bytesio_getstate(PyObject *op, PyObject *Py_UNUSED(ignored))
bytesio_getstate(PyObject *op, PyObject *Py_UNUSED(dummy))
{
bytesio *self = _bytesio_CAST(op);
PyObject *initvalue = _io_BytesIO_getvalue_impl(self);
Expand Down Expand Up @@ -970,7 +970,7 @@ _io_BytesIO___init___impl(bytesio *self, PyObject *initvalue)
}

static PyObject *
bytesio_sizeof(PyObject *op, PyObject *Py_UNUSED(ignored))
bytesio_sizeof(PyObject *op, PyObject *Py_UNUSED(dummy))
{
bytesio *self = _bytesio_CAST(op);
size_t res = _PyObject_SIZE(Py_TYPE(self));
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ _io_FileIO_isatty_impl(fileio *self)
context TOCTOU issues (the fd could be arbitrarily modified by
surrounding code). */
static PyObject *
_io_FileIO_isatty_open_only(PyObject *op, PyObject *Py_UNUSED(ignored))
_io_FileIO_isatty_open_only(PyObject *op, PyObject *Py_UNUSED(dummy))
{
fileio *self = _PyFileIO_CAST(op);
if (self->stat_atopen != NULL && !S_ISCHR(self->stat_atopen->st_mode)) {
Expand Down