Skip to content
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
32 changes: 16 additions & 16 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ _asyncio_Future_get_loop_impl(FutureObj *self)
}

static PyObject *
FutureObj_get_blocking(FutureObj *fut)
FutureObj_get_blocking(FutureObj *fut, void *Py_UNUSED(ignored))
{
if (future_is_alive(fut) && fut->fut_blocking) {
Py_RETURN_TRUE;
Expand All @@ -1108,7 +1108,7 @@ FutureObj_get_blocking(FutureObj *fut)
}

static int
FutureObj_set_blocking(FutureObj *fut, PyObject *val)
FutureObj_set_blocking(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored))
{
if (future_ensure_alive(fut)) {
return -1;
Expand All @@ -1123,7 +1123,7 @@ FutureObj_set_blocking(FutureObj *fut, PyObject *val)
}

static PyObject *
FutureObj_get_log_traceback(FutureObj *fut)
FutureObj_get_log_traceback(FutureObj *fut, void *Py_UNUSED(ignored))
{
ENSURE_FUTURE_ALIVE(fut)
if (fut->fut_log_tb) {
Expand All @@ -1135,7 +1135,7 @@ FutureObj_get_log_traceback(FutureObj *fut)
}

static int
FutureObj_set_log_traceback(FutureObj *fut, PyObject *val)
FutureObj_set_log_traceback(FutureObj *fut, PyObject *val, void *Py_UNUSED(ignored))
{
int is_true = PyObject_IsTrue(val);
if (is_true < 0) {
Expand All @@ -1151,7 +1151,7 @@ FutureObj_set_log_traceback(FutureObj *fut, PyObject *val)
}

static PyObject *
FutureObj_get_loop(FutureObj *fut)
FutureObj_get_loop(FutureObj *fut, void *Py_UNUSED(ignored))
{
if (!future_is_alive(fut)) {
Py_RETURN_NONE;
Expand All @@ -1161,7 +1161,7 @@ FutureObj_get_loop(FutureObj *fut)
}

static PyObject *
FutureObj_get_callbacks(FutureObj *fut)
FutureObj_get_callbacks(FutureObj *fut, void *Py_UNUSED(ignored))
{
Py_ssize_t i;

Expand Down Expand Up @@ -1213,7 +1213,7 @@ FutureObj_get_callbacks(FutureObj *fut)
}

static PyObject *
FutureObj_get_result(FutureObj *fut)
FutureObj_get_result(FutureObj *fut, void *Py_UNUSED(ignored))
{
ENSURE_FUTURE_ALIVE(fut)
if (fut->fut_result == NULL) {
Expand All @@ -1224,7 +1224,7 @@ FutureObj_get_result(FutureObj *fut)
}

static PyObject *
FutureObj_get_exception(FutureObj *fut)
FutureObj_get_exception(FutureObj *fut, void *Py_UNUSED(ignored))
{
ENSURE_FUTURE_ALIVE(fut)
if (fut->fut_exception == NULL) {
Expand All @@ -1235,7 +1235,7 @@ FutureObj_get_exception(FutureObj *fut)
}

static PyObject *
FutureObj_get_source_traceback(FutureObj *fut)
FutureObj_get_source_traceback(FutureObj *fut, void *Py_UNUSED(ignored))
{
if (!future_is_alive(fut) || fut->fut_source_tb == NULL) {
Py_RETURN_NONE;
Expand All @@ -1245,7 +1245,7 @@ FutureObj_get_source_traceback(FutureObj *fut)
}

static PyObject *
FutureObj_get_state(FutureObj *fut)
FutureObj_get_state(FutureObj *fut, void *Py_UNUSED(ignored))
{
_Py_IDENTIFIER(PENDING);
_Py_IDENTIFIER(CANCELLED);
Expand Down Expand Up @@ -1714,7 +1714,7 @@ TaskStepMethWrapper_traverse(TaskStepMethWrapper *o,
}

static PyObject *
TaskStepMethWrapper_get___self__(TaskStepMethWrapper *o)
TaskStepMethWrapper_get___self__(TaskStepMethWrapper *o, void *Py_UNUSED(ignored))
{
if (o->sw_task) {
Py_INCREF(o->sw_task);
Expand Down Expand Up @@ -2002,7 +2002,7 @@ TaskObj_traverse(TaskObj *task, visitproc visit, void *arg)
}

static PyObject *
TaskObj_get_log_destroy_pending(TaskObj *task)
TaskObj_get_log_destroy_pending(TaskObj *task, void *Py_UNUSED(ignored))
{
if (task->task_log_destroy_pending) {
Py_RETURN_TRUE;
Expand All @@ -2013,7 +2013,7 @@ TaskObj_get_log_destroy_pending(TaskObj *task)
}

static int
TaskObj_set_log_destroy_pending(TaskObj *task, PyObject *val)
TaskObj_set_log_destroy_pending(TaskObj *task, PyObject *val, void *Py_UNUSED(ignored))
{
int is_true = PyObject_IsTrue(val);
if (is_true < 0) {
Expand All @@ -2024,7 +2024,7 @@ TaskObj_set_log_destroy_pending(TaskObj *task, PyObject *val)
}

static PyObject *
TaskObj_get_must_cancel(TaskObj *task)
TaskObj_get_must_cancel(TaskObj *task, void *Py_UNUSED(ignored))
{
if (task->task_must_cancel) {
Py_RETURN_TRUE;
Expand All @@ -2035,7 +2035,7 @@ TaskObj_get_must_cancel(TaskObj *task)
}

static PyObject *
TaskObj_get_coro(TaskObj *task)
TaskObj_get_coro(TaskObj *task, void *Py_UNUSED(ignored))
{
if (task->task_coro) {
Py_INCREF(task->task_coro);
Expand All @@ -2046,7 +2046,7 @@ TaskObj_get_coro(TaskObj *task)
}

static PyObject *
TaskObj_get_fut_waiter(TaskObj *task)
TaskObj_get_fut_waiter(TaskObj *task, void *Py_UNUSED(ignored))
{
if (task->task_fut_waiter) {
Py_INCREF(task->task_fut_waiter);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_collectionsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ deque_bool(dequeobject *deque)
}

static PyObject *
deque_get_maxlen(dequeobject *deque)
deque_get_maxlen(dequeobject *deque, void *Py_UNUSED(ignored))
{
if (deque->maxlen < 0)
Py_RETURN_NONE;
Expand Down
10 changes: 5 additions & 5 deletions Modules/_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,31 +160,31 @@ get_nullchar_as_None(Py_UCS4 c)
}

static PyObject *
Dialect_get_lineterminator(DialectObj *self)
Dialect_get_lineterminator(DialectObj *self, void *Py_UNUSED(ignored))
{
return get_string(self->lineterminator);
}

static PyObject *
Dialect_get_delimiter(DialectObj *self)
Dialect_get_delimiter(DialectObj *self, void *Py_UNUSED(ignored))
{
return get_nullchar_as_None(self->delimiter);
}

static PyObject *
Dialect_get_escapechar(DialectObj *self)
Dialect_get_escapechar(DialectObj *self, void *Py_UNUSED(ignored))
{
return get_nullchar_as_None(self->escapechar);
}

static PyObject *
Dialect_get_quotechar(DialectObj *self)
Dialect_get_quotechar(DialectObj *self, void *Py_UNUSED(ignored))
{
return get_nullchar_as_None(self->quotechar);
}

static PyObject *
Dialect_get_quoting(DialectObj *self)
Dialect_get_quoting(DialectObj *self, void *Py_UNUSED(ignored))
{
return PyLong_FromLong(self->quoting);
}
Expand Down
34 changes: 17 additions & 17 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ PyTypeObject PyCPointerType_Type = {
*/

static int
CharArray_set_raw(CDataObject *self, PyObject *value)
CharArray_set_raw(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
char *ptr;
Py_ssize_t size;
Expand All @@ -1187,13 +1187,13 @@ CharArray_set_raw(CDataObject *self, PyObject *value)
}

static PyObject *
CharArray_get_raw(CDataObject *self)
CharArray_get_raw(CDataObject *self, void *Py_UNUSED(ignored))
{
return PyBytes_FromStringAndSize(self->b_ptr, self->b_size);
}

static PyObject *
CharArray_get_value(CDataObject *self)
CharArray_get_value(CDataObject *self, void *Py_UNUSED(ignored))
{
Py_ssize_t i;
char *ptr = self->b_ptr;
Expand All @@ -1204,7 +1204,7 @@ CharArray_get_value(CDataObject *self)
}

static int
CharArray_set_value(CDataObject *self, PyObject *value)
CharArray_set_value(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
char *ptr;
Py_ssize_t size;
Expand Down Expand Up @@ -1249,7 +1249,7 @@ static PyGetSetDef CharArray_getsets[] = {

#ifdef CTYPES_UNICODE
static PyObject *
WCharArray_get_value(CDataObject *self)
WCharArray_get_value(CDataObject *self, void *Py_UNUSED(ignored))
{
Py_ssize_t i;
wchar_t *ptr = (wchar_t *)self->b_ptr;
Expand All @@ -1260,7 +1260,7 @@ WCharArray_get_value(CDataObject *self)
}

static int
WCharArray_set_value(CDataObject *self, PyObject *value)
WCharArray_set_value(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
Py_ssize_t result = 0;
Py_UNICODE *wstr;
Expand Down Expand Up @@ -3060,7 +3060,7 @@ GenericPyCData_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
*/

static int
PyCFuncPtr_set_errcheck(PyCFuncPtrObject *self, PyObject *ob)
PyCFuncPtr_set_errcheck(PyCFuncPtrObject *self, PyObject *ob, void *Py_UNUSED(ignored))
{
if (ob && !PyCallable_Check(ob)) {
PyErr_SetString(PyExc_TypeError,
Expand All @@ -3073,7 +3073,7 @@ PyCFuncPtr_set_errcheck(PyCFuncPtrObject *self, PyObject *ob)
}

static PyObject *
PyCFuncPtr_get_errcheck(PyCFuncPtrObject *self)
PyCFuncPtr_get_errcheck(PyCFuncPtrObject *self, void *Py_UNUSED(ignored))
{
if (self->errcheck) {
Py_INCREF(self->errcheck);
Expand All @@ -3083,7 +3083,7 @@ PyCFuncPtr_get_errcheck(PyCFuncPtrObject *self)
}

static int
PyCFuncPtr_set_restype(PyCFuncPtrObject *self, PyObject *ob)
PyCFuncPtr_set_restype(PyCFuncPtrObject *self, PyObject *ob, void *Py_UNUSED(ignored))
{
if (ob == NULL) {
Py_CLEAR(self->restype);
Expand All @@ -3104,7 +3104,7 @@ PyCFuncPtr_set_restype(PyCFuncPtrObject *self, PyObject *ob)
}

static PyObject *
PyCFuncPtr_get_restype(PyCFuncPtrObject *self)
PyCFuncPtr_get_restype(PyCFuncPtrObject *self, void *Py_UNUSED(ignored))
{
StgDictObject *dict;
if (self->restype) {
Expand All @@ -3122,7 +3122,7 @@ PyCFuncPtr_get_restype(PyCFuncPtrObject *self)
}

static int
PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob)
PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob, void *Py_UNUSED(ignored))
{
PyObject *converters;

Expand All @@ -3141,7 +3141,7 @@ PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob)
}

static PyObject *
PyCFuncPtr_get_argtypes(PyCFuncPtrObject *self)
PyCFuncPtr_get_argtypes(PyCFuncPtrObject *self, void *Py_UNUSED(ignored))
{
StgDictObject *dict;
if (self->argtypes) {
Expand Down Expand Up @@ -4685,7 +4685,7 @@ PyCArrayType_from_ctype(PyObject *itemtype, Py_ssize_t length)
*/

static int
Simple_set_value(CDataObject *self, PyObject *value)
Simple_set_value(CDataObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
PyObject *result;
StgDictObject *dict = PyObject_stgdict((PyObject *)self);
Expand All @@ -4712,12 +4712,12 @@ Simple_init(CDataObject *self, PyObject *args, PyObject *kw)
if (!PyArg_UnpackTuple(args, "__init__", 0, 1, &value))
return -1;
if (value)
return Simple_set_value(self, value);
return Simple_set_value(self, value, NULL);
return 0;
}

static PyObject *
Simple_get_value(CDataObject *self)
Simple_get_value(CDataObject *self, void *Py_UNUSED(ignored))
{
StgDictObject *dict;
dict = PyObject_stgdict((PyObject *)self);
Expand All @@ -4740,7 +4740,7 @@ Simple_from_outparm(PyObject *self, PyObject *args)
return self;
}
/* call stgdict->getfunc */
return Simple_get_value((CDataObject *)self);
return Simple_get_value((CDataObject *)self, NULL);
}

static PyMethodDef Simple_methods[] = {
Expand Down Expand Up @@ -4777,7 +4777,7 @@ Simple_repr(CDataObject *self)
Py_TYPE(self)->tp_name, self);
}

val = Simple_get_value(self);
val = Simple_get_value(self, NULL);
if (val == NULL)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ PyCursesWindow_get_encoding(PyCursesWindowObject *self, void *closure)
}

static int
PyCursesWindow_set_encoding(PyCursesWindowObject *self, PyObject *value)
PyCursesWindow_set_encoding(PyCursesWindowObject *self, PyObject *value, void *Py_UNUSED(ignored))
{
PyObject *ascii;
char *encoding;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/bytesio.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ write_bytes(bytesio *self, const char *bytes, Py_ssize_t len)
}

static PyObject *
bytesio_get_closed(bytesio *self)
bytesio_get_closed(bytesio *self, void *Py_UNUSED(ignored))
{
if (self->buf == NULL) {
Py_RETURN_TRUE;
Expand Down
Loading