diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 17:34:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 17:34:35 (GMT) |
commit | d4f9cf5545d6d8844e0726552ef2e366f5cc3abd (patch) | |
tree | 7aefae9861ee6b83652f6a352397b9dc145cc0d3 /Modules | |
parent | 1005c84535191a72ebb7587d8c5636a065b7ed79 (diff) | |
download | cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.zip cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.gz cpython-d4f9cf5545d6d8844e0726552ef2e366f5cc3abd.tar.bz2 |
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
Fix also return type for few other functions (clear, releasebuffer).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 32 | ||||
-rw-r--r-- | Modules/_collectionsmodule.c | 2 | ||||
-rw-r--r-- | Modules/_csv.c | 10 | ||||
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 34 | ||||
-rw-r--r-- | Modules/_cursesmodule.c | 2 | ||||
-rw-r--r-- | Modules/_io/bytesio.c | 2 | ||||
-rw-r--r-- | Modules/_pickle.c | 16 | ||||
-rw-r--r-- | Modules/_sqlite/connection.c | 7 | ||||
-rw-r--r-- | Modules/_sqlite/row.c | 3 | ||||
-rw-r--r-- | Modules/_sre.c | 8 | ||||
-rw-r--r-- | Modules/_testbuffer.c | 4 | ||||
-rw-r--r-- | Modules/_tkinter.c | 4 | ||||
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 2 | ||||
-rw-r--r-- | Modules/mmapmodule.c | 2 | ||||
-rw-r--r-- | Modules/selectmodule.c | 6 | ||||
-rw-r--r-- | Modules/xxsubtype.c | 2 |
16 files changed, 68 insertions, 68 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 8898671..0998cc1 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -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; @@ -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; @@ -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) { @@ -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) { @@ -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; @@ -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; @@ -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) { @@ -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) { @@ -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; @@ -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); @@ -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); @@ -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; @@ -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) { @@ -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; @@ -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); @@ -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); diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 1ad4a03..4da0662 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -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; diff --git a/Modules/_csv.c b/Modules/_csv.c index b4e92de..6c00974 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -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); } diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 60f6985..36ef5d9 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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, @@ -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); @@ -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); @@ -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) { @@ -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; @@ -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) { @@ -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); @@ -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); @@ -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[] = { @@ -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; diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index cd32412..9a1d2ef 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -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; diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c index 8e54ec8..55e34c6 100644 --- a/Modules/_io/bytesio.c +++ b/Modules/_io/bytesio.c @@ -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; diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 3a77005..39f8b75 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -4561,13 +4561,13 @@ PicklerMemoProxy_New(PicklerObject *pickler) /*****************************************************************************/ static PyObject * -Pickler_get_memo(PicklerObject *self) +Pickler_get_memo(PicklerObject *self, void *Py_UNUSED(ignored)) { return PicklerMemoProxy_New(self); } static int -Pickler_set_memo(PicklerObject *self, PyObject *obj) +Pickler_set_memo(PicklerObject *self, PyObject *obj, void *Py_UNUSED(ignored)) { PyMemoTable *new_memo = NULL; @@ -4629,7 +4629,7 @@ Pickler_set_memo(PicklerObject *self, PyObject *obj) } static PyObject * -Pickler_get_persid(PicklerObject *self) +Pickler_get_persid(PicklerObject *self, void *Py_UNUSED(ignored)) { if (self->pers_func == NULL) { PyErr_SetString(PyExc_AttributeError, "persistent_id"); @@ -4639,7 +4639,7 @@ Pickler_get_persid(PicklerObject *self) } static int -Pickler_set_persid(PicklerObject *self, PyObject *value) +Pickler_set_persid(PicklerObject *self, PyObject *value, void *Py_UNUSED(ignored)) { if (value == NULL) { PyErr_SetString(PyExc_TypeError, @@ -6999,13 +6999,13 @@ UnpicklerMemoProxy_New(UnpicklerObject *unpickler) static PyObject * -Unpickler_get_memo(UnpicklerObject *self) +Unpickler_get_memo(UnpicklerObject *self, void *Py_UNUSED(ignored)) { return UnpicklerMemoProxy_New(self); } static int -Unpickler_set_memo(UnpicklerObject *self, PyObject *obj) +Unpickler_set_memo(UnpicklerObject *self, PyObject *obj, void *Py_UNUSED(ignored)) { PyObject **new_memo; size_t new_memo_size = 0; @@ -7082,7 +7082,7 @@ Unpickler_set_memo(UnpicklerObject *self, PyObject *obj) } static PyObject * -Unpickler_get_persload(UnpicklerObject *self) +Unpickler_get_persload(UnpicklerObject *self, void *Py_UNUSED(ignored)) { if (self->pers_func == NULL) { PyErr_SetString(PyExc_AttributeError, "persistent_load"); @@ -7092,7 +7092,7 @@ Unpickler_get_persload(UnpicklerObject *self) } static int -Unpickler_set_persload(UnpicklerObject *self, PyObject *value) +Unpickler_set_persload(UnpicklerObject *self, PyObject *value, void *Py_UNUSED(ignored)) { if (value == NULL) { PyErr_SetString(PyExc_TypeError, diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 65e8df4..b59d7d2 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -55,7 +55,7 @@ static const char * const begin_statements[] = { NULL }; -static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level); +static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level, void *Py_UNUSED(ignored)); static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self); @@ -147,7 +147,7 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject Py_INCREF(isolation_level); } Py_CLEAR(self->isolation_level); - if (pysqlite_connection_set_isolation_level(self, isolation_level) < 0) { + if (pysqlite_connection_set_isolation_level(self, isolation_level, NULL) < 0) { Py_DECREF(isolation_level); return -1; } @@ -1163,7 +1163,8 @@ static PyObject* pysqlite_connection_get_in_transaction(pysqlite_Connection* sel Py_RETURN_FALSE; } -static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level) +static int +pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level, void *Py_UNUSED(ignored)) { if (isolation_level == Py_None) { PyObject *res = pysqlite_connection_commit(self, NULL); diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index 2fc26a8..3cfbeeb 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -150,7 +150,8 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx) } } -Py_ssize_t pysqlite_row_length(pysqlite_Row* self, PyObject* args, PyObject* kwargs) +static Py_ssize_t +pysqlite_row_length(pysqlite_Row* self) { return PyTuple_GET_SIZE(self->data); } diff --git a/Modules/_sre.c b/Modules/_sre.c index c350979..75f030c 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1305,7 +1305,7 @@ PyDoc_STRVAR(pattern_doc, "Compiled regular expression object."); /* PatternObject's 'groupindex' method. */ static PyObject * -pattern_groupindex(PatternObject *self) +pattern_groupindex(PatternObject *self, void *Py_UNUSED(ignored)) { if (self->groupindex == NULL) return PyDict_New(); @@ -2272,7 +2272,7 @@ PyDoc_STRVAR(match_group_doc, For 0 returns the entire match."); static PyObject * -match_lastindex_get(MatchObject *self) +match_lastindex_get(MatchObject *self, void *Py_UNUSED(ignored)) { if (self->lastindex >= 0) return PyLong_FromSsize_t(self->lastindex); @@ -2280,7 +2280,7 @@ match_lastindex_get(MatchObject *self) } static PyObject * -match_lastgroup_get(MatchObject *self) +match_lastgroup_get(MatchObject *self, void *Py_UNUSED(ignored)) { if (self->pattern->indexgroup && self->lastindex >= 0 && @@ -2295,7 +2295,7 @@ match_lastgroup_get(MatchObject *self) } static PyObject * -match_regs_get(MatchObject *self) +match_regs_get(MatchObject *self, void *Py_UNUSED(ignored)) { if (self->regs) { Py_INCREF(self->regs); diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c index 4ff44f9..9d7b3e8 100644 --- a/Modules/_testbuffer.c +++ b/Modules/_testbuffer.c @@ -1531,7 +1531,7 @@ ndarray_getbuf(NDArrayObject *self, Py_buffer *view, int flags) return 0; } -static int +static void ndarray_releasebuf(NDArrayObject *self, Py_buffer *view) { if (!ND_IS_CONSUMER(self)) { @@ -1539,8 +1539,6 @@ ndarray_releasebuf(NDArrayObject *self, Py_buffer *view) if (--ndbuf->exports == 0 && ndbuf != self->head) ndbuf_delete(self, ndbuf); } - - return 0; } static PyBufferProcs ndarray_as_buffer = { diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index fa26859..a96924c 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -842,7 +842,7 @@ PyTclObject_string(PyTclObject *self, void *ignored) } static PyObject * -PyTclObject_str(PyTclObject *self, void *ignored) +PyTclObject_str(PyTclObject *self) { if (self->string) { Py_INCREF(self->string); @@ -855,7 +855,7 @@ PyTclObject_str(PyTclObject *self, void *ignored) static PyObject * PyTclObject_repr(PyTclObject *self) { - PyObject *repr, *str = PyTclObject_str(self, NULL); + PyObject *repr, *str = PyTclObject_str(self); if (str == NULL) return NULL; repr = PyUnicode_FromFormat("<%s object: %R>", diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 8a0ac87..938a774 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -108,7 +108,7 @@ call_error_callback(PyObject *errors, PyObject *exc) } static PyObject * -codecctx_errors_get(MultibyteStatefulCodecContext *self) +codecctx_errors_get(MultibyteStatefulCodecContext *self, void *Py_UNUSED(ignored)) { const char *errors; diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 8663235..f4caf87 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -656,7 +656,7 @@ mmap_move_method(mmap_object *self, PyObject *args) } static PyObject * -mmap_closed_get(mmap_object *self) +mmap_closed_get(mmap_object *self, void *Py_UNUSED(ignored)) { #ifdef MS_WINDOWS return PyBool_FromLong(self->map_handle == NULL ? 1 : 0); diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index d86727a..5a6b134 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -1031,7 +1031,7 @@ select_devpoll_close_impl(devpollObject *self) } static PyObject* -devpoll_get_closed(devpollObject *self) +devpoll_get_closed(devpollObject *self, void *Py_UNUSED(ignored)) { if (self->fd_devpoll < 0) Py_RETURN_TRUE; @@ -1333,7 +1333,7 @@ select_epoll_close_impl(pyEpoll_Object *self) static PyObject* -pyepoll_get_closed(pyEpoll_Object *self) +pyepoll_get_closed(pyEpoll_Object *self, void *Py_UNUSED(ignored)) { if (self->epfd < 0) Py_RETURN_TRUE; @@ -1979,7 +1979,7 @@ select_kqueue_close_impl(kqueue_queue_Object *self) } static PyObject* -kqueue_queue_get_closed(kqueue_queue_Object *self) +kqueue_queue_get_closed(kqueue_queue_Object *self, void *Py_UNUSED(ignored)) { if (self->kqfd < 0) Py_RETURN_TRUE; diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c index d9cb4cd..bacbdf1 100644 --- a/Modules/xxsubtype.c +++ b/Modules/xxsubtype.c @@ -89,7 +89,7 @@ spamlist_init(spamlistobject *self, PyObject *args, PyObject *kwds) } static PyObject * -spamlist_state_get(spamlistobject *self) +spamlist_state_get(spamlistobject *self, void *Py_UNUSED(ignored)) { return PyLong_FromLong(self->state); } |