diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytearrayobject.c | 34 | ||||
-rw-r--r-- | Objects/bytesobject.c | 34 | ||||
-rw-r--r-- | Objects/classobject.c | 2 | ||||
-rw-r--r-- | Objects/complexobject.c | 4 | ||||
-rw-r--r-- | Objects/descrobject.c | 12 | ||||
-rw-r--r-- | Objects/dictobject.c | 32 | ||||
-rw-r--r-- | Objects/enumobject.c | 6 | ||||
-rw-r--r-- | Objects/exceptions.c | 6 | ||||
-rw-r--r-- | Objects/fileobject.c | 6 | ||||
-rw-r--r-- | Objects/frameobject.c | 4 | ||||
-rw-r--r-- | Objects/iterobject.c | 6 | ||||
-rw-r--r-- | Objects/listobject.c | 16 | ||||
-rw-r--r-- | Objects/longobject.c | 20 | ||||
-rw-r--r-- | Objects/methodobject.c | 2 | ||||
-rw-r--r-- | Objects/namespaceobject.c | 2 | ||||
-rw-r--r-- | Objects/object.c | 4 | ||||
-rw-r--r-- | Objects/odictobject.c | 36 | ||||
-rw-r--r-- | Objects/rangeobject.c | 12 | ||||
-rw-r--r-- | Objects/setobject.c | 40 | ||||
-rw-r--r-- | Objects/sliceobject.c | 6 | ||||
-rw-r--r-- | Objects/stringlib/ctype.h | 26 | ||||
-rw-r--r-- | Objects/structseq.c | 2 | ||||
-rw-r--r-- | Objects/tupleobject.c | 4 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 8 | ||||
-rw-r--r-- | Objects/weakrefobject.c | 4 |
25 files changed, 164 insertions, 164 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 692b7be..753ee8e 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -1940,7 +1940,7 @@ PyDoc_STRVAR(alloc_doc, Return the number of bytes actually allocated."); static PyObject * -bytearray_alloc(PyByteArrayObject *self) +bytearray_alloc(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored)) { return PyLong_FromSsize_t(self->ob_alloc); } @@ -2018,7 +2018,7 @@ Create a string of hexadecimal numbers from a bytearray object.\n\ Example: bytearray([0xb9, 0x01, 0xef]).hex() -> 'b901ef'."); static PyObject * -bytearray_hex(PyBytesObject *self) +bytearray_hex(PyBytesObject *self, PyObject *Py_UNUSED(ignored)) { char* argbuf = PyByteArray_AS_STRING(self); Py_ssize_t arglen = PyByteArray_GET_SIZE(self); @@ -2136,7 +2136,7 @@ bytearray_methods[] = { BYTEARRAY_REDUCE_EX_METHODDEF BYTEARRAY_SIZEOF_METHODDEF BYTEARRAY_APPEND_METHODDEF - {"capitalize", (PyCFunction)stringlib_capitalize, METH_NOARGS, + {"capitalize", stringlib_capitalize, METH_NOARGS, _Py_capitalize__doc__}, {"center", (PyCFunction)stringlib_center, METH_VARARGS, _Py_center__doc__}, BYTEARRAY_CLEAR_METHODDEF @@ -2155,25 +2155,25 @@ bytearray_methods[] = { {"hex", (PyCFunction)bytearray_hex, METH_NOARGS, hex__doc__}, {"index", (PyCFunction)bytearray_index, METH_VARARGS, _Py_index__doc__}, BYTEARRAY_INSERT_METHODDEF - {"isalnum", (PyCFunction)stringlib_isalnum, METH_NOARGS, + {"isalnum", stringlib_isalnum, METH_NOARGS, _Py_isalnum__doc__}, - {"isalpha", (PyCFunction)stringlib_isalpha, METH_NOARGS, + {"isalpha", stringlib_isalpha, METH_NOARGS, _Py_isalpha__doc__}, - {"isascii", (PyCFunction)stringlib_isascii, METH_NOARGS, + {"isascii", stringlib_isascii, METH_NOARGS, _Py_isascii__doc__}, - {"isdigit", (PyCFunction)stringlib_isdigit, METH_NOARGS, + {"isdigit", stringlib_isdigit, METH_NOARGS, _Py_isdigit__doc__}, - {"islower", (PyCFunction)stringlib_islower, METH_NOARGS, + {"islower", stringlib_islower, METH_NOARGS, _Py_islower__doc__}, - {"isspace", (PyCFunction)stringlib_isspace, METH_NOARGS, + {"isspace", stringlib_isspace, METH_NOARGS, _Py_isspace__doc__}, - {"istitle", (PyCFunction)stringlib_istitle, METH_NOARGS, + {"istitle", stringlib_istitle, METH_NOARGS, _Py_istitle__doc__}, - {"isupper", (PyCFunction)stringlib_isupper, METH_NOARGS, + {"isupper", stringlib_isupper, METH_NOARGS, _Py_isupper__doc__}, BYTEARRAY_JOIN_METHODDEF {"ljust", (PyCFunction)stringlib_ljust, METH_VARARGS, _Py_ljust__doc__}, - {"lower", (PyCFunction)stringlib_lower, METH_NOARGS, _Py_lower__doc__}, + {"lower", stringlib_lower, METH_NOARGS, _Py_lower__doc__}, BYTEARRAY_LSTRIP_METHODDEF BYTEARRAY_MAKETRANS_METHODDEF BYTEARRAY_PARTITION_METHODDEF @@ -2192,11 +2192,11 @@ bytearray_methods[] = { {"startswith", (PyCFunction)bytearray_startswith, METH_VARARGS , _Py_startswith__doc__}, BYTEARRAY_STRIP_METHODDEF - {"swapcase", (PyCFunction)stringlib_swapcase, METH_NOARGS, + {"swapcase", stringlib_swapcase, METH_NOARGS, _Py_swapcase__doc__}, - {"title", (PyCFunction)stringlib_title, METH_NOARGS, _Py_title__doc__}, + {"title", stringlib_title, METH_NOARGS, _Py_title__doc__}, BYTEARRAY_TRANSLATE_METHODDEF - {"upper", (PyCFunction)stringlib_upper, METH_NOARGS, _Py_upper__doc__}, + {"upper", stringlib_upper, METH_NOARGS, _Py_upper__doc__}, {"zfill", (PyCFunction)stringlib_zfill, METH_VARARGS, _Py_zfill__doc__}, {NULL} }; @@ -2324,7 +2324,7 @@ bytearrayiter_next(bytesiterobject *it) } static PyObject * -bytearrayiter_length_hint(bytesiterobject *it) +bytearrayiter_length_hint(bytesiterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (it->it_seq) { @@ -2340,7 +2340,7 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -bytearrayiter_reduce(bytesiterobject *it) +bytearrayiter_reduce(bytesiterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_seq != NULL) { return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"), diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index c358756..f5bd5fb 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2422,7 +2422,7 @@ Create a string of hexadecimal numbers from a bytes object.\n\ Example: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'."); static PyObject * -bytes_hex(PyBytesObject *self) +bytes_hex(PyBytesObject *self, PyObject *Py_UNUSED(ignored)) { char* argbuf = PyBytes_AS_STRING(self); Py_ssize_t arglen = PyBytes_GET_SIZE(self); @@ -2430,7 +2430,7 @@ bytes_hex(PyBytesObject *self) } static PyObject * -bytes_getnewargs(PyBytesObject *v) +bytes_getnewargs(PyBytesObject *v, PyObject *Py_UNUSED(ignored)) { return Py_BuildValue("(y#)", v->ob_sval, Py_SIZE(v)); } @@ -2439,7 +2439,7 @@ bytes_getnewargs(PyBytesObject *v) static PyMethodDef bytes_methods[] = { {"__getnewargs__", (PyCFunction)bytes_getnewargs, METH_NOARGS}, - {"capitalize", (PyCFunction)stringlib_capitalize, METH_NOARGS, + {"capitalize", stringlib_capitalize, METH_NOARGS, _Py_capitalize__doc__}, {"center", (PyCFunction)stringlib_center, METH_VARARGS, _Py_center__doc__}, @@ -2455,25 +2455,25 @@ bytes_methods[] = { BYTES_FROMHEX_METHODDEF {"hex", (PyCFunction)bytes_hex, METH_NOARGS, hex__doc__}, {"index", (PyCFunction)bytes_index, METH_VARARGS, _Py_index__doc__}, - {"isalnum", (PyCFunction)stringlib_isalnum, METH_NOARGS, + {"isalnum", stringlib_isalnum, METH_NOARGS, _Py_isalnum__doc__}, - {"isalpha", (PyCFunction)stringlib_isalpha, METH_NOARGS, + {"isalpha", stringlib_isalpha, METH_NOARGS, _Py_isalpha__doc__}, - {"isascii", (PyCFunction)stringlib_isascii, METH_NOARGS, + {"isascii", stringlib_isascii, METH_NOARGS, _Py_isascii__doc__}, - {"isdigit", (PyCFunction)stringlib_isdigit, METH_NOARGS, + {"isdigit", stringlib_isdigit, METH_NOARGS, _Py_isdigit__doc__}, - {"islower", (PyCFunction)stringlib_islower, METH_NOARGS, + {"islower", stringlib_islower, METH_NOARGS, _Py_islower__doc__}, - {"isspace", (PyCFunction)stringlib_isspace, METH_NOARGS, + {"isspace", stringlib_isspace, METH_NOARGS, _Py_isspace__doc__}, - {"istitle", (PyCFunction)stringlib_istitle, METH_NOARGS, + {"istitle", stringlib_istitle, METH_NOARGS, _Py_istitle__doc__}, - {"isupper", (PyCFunction)stringlib_isupper, METH_NOARGS, + {"isupper", stringlib_isupper, METH_NOARGS, _Py_isupper__doc__}, BYTES_JOIN_METHODDEF {"ljust", (PyCFunction)stringlib_ljust, METH_VARARGS, _Py_ljust__doc__}, - {"lower", (PyCFunction)stringlib_lower, METH_NOARGS, _Py_lower__doc__}, + {"lower", stringlib_lower, METH_NOARGS, _Py_lower__doc__}, BYTES_LSTRIP_METHODDEF BYTES_MAKETRANS_METHODDEF BYTES_PARTITION_METHODDEF @@ -2489,11 +2489,11 @@ bytes_methods[] = { {"startswith", (PyCFunction)bytes_startswith, METH_VARARGS, _Py_startswith__doc__}, BYTES_STRIP_METHODDEF - {"swapcase", (PyCFunction)stringlib_swapcase, METH_NOARGS, + {"swapcase", stringlib_swapcase, METH_NOARGS, _Py_swapcase__doc__}, - {"title", (PyCFunction)stringlib_title, METH_NOARGS, _Py_title__doc__}, + {"title", stringlib_title, METH_NOARGS, _Py_title__doc__}, BYTES_TRANSLATE_METHODDEF - {"upper", (PyCFunction)stringlib_upper, METH_NOARGS, _Py_upper__doc__}, + {"upper", stringlib_upper, METH_NOARGS, _Py_upper__doc__}, {"zfill", (PyCFunction)stringlib_zfill, METH_VARARGS, _Py_zfill__doc__}, {NULL, NULL} /* sentinel */ }; @@ -3037,7 +3037,7 @@ striter_next(striterobject *it) } static PyObject * -striter_len(striterobject *it) +striter_len(striterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (it->it_seq) @@ -3049,7 +3049,7 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -striter_reduce(striterobject *it) +striter_reduce(striterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_seq != NULL) { return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"), diff --git a/Objects/classobject.c b/Objects/classobject.c index 3dc23b7..095b0ca 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -73,7 +73,7 @@ PyMethod_New(PyObject *func, PyObject *self) } static PyObject * -method_reduce(PyMethodObject *im) +method_reduce(PyMethodObject *im, PyObject *Py_UNUSED(ignored)) { PyObject *self = PyMethod_GET_SELF(im); PyObject *func = PyMethod_GET_FUNCTION(im); diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 2c886c7..6e3d47b 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -695,7 +695,7 @@ complex_float(PyObject *v) } static PyObject * -complex_conjugate(PyObject *self) +complex_conjugate(PyObject *self, PyObject *Py_UNUSED(ignored)) { Py_complex c; c = ((PyComplexObject *)self)->cval; @@ -709,7 +709,7 @@ PyDoc_STRVAR(complex_conjugate_doc, "Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j."); static PyObject * -complex_getnewargs(PyComplexObject *v) +complex_getnewargs(PyComplexObject *v, PyObject *Py_UNUSED(ignored)) { Py_complex c = v->cval; return Py_BuildValue("(dd)", c.real, c.imag); diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 6014039..dfad1ec 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -448,7 +448,7 @@ descr_get_qualname(PyDescrObject *descr) } static PyObject * -descr_reduce(PyDescrObject *descr) +descr_reduce(PyDescrObject *descr, PyObject *Py_UNUSED(ignored)) { PyObject *builtins; PyObject *getattr; @@ -868,28 +868,28 @@ mappingproxy_get(mappingproxyobject *pp, PyObject *args) } static PyObject * -mappingproxy_keys(mappingproxyobject *pp) +mappingproxy_keys(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored)) { _Py_IDENTIFIER(keys); return _PyObject_CallMethodId(pp->mapping, &PyId_keys, NULL); } static PyObject * -mappingproxy_values(mappingproxyobject *pp) +mappingproxy_values(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored)) { _Py_IDENTIFIER(values); return _PyObject_CallMethodId(pp->mapping, &PyId_values, NULL); } static PyObject * -mappingproxy_items(mappingproxyobject *pp) +mappingproxy_items(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored)) { _Py_IDENTIFIER(items); return _PyObject_CallMethodId(pp->mapping, &PyId_items, NULL); } static PyObject * -mappingproxy_copy(mappingproxyobject *pp) +mappingproxy_copy(mappingproxyobject *pp, PyObject *Py_UNUSED(ignored)) { _Py_IDENTIFIER(copy); return _PyObject_CallMethodId(pp->mapping, &PyId_copy, NULL); @@ -1086,7 +1086,7 @@ wrapper_repr(wrapperobject *wp) } static PyObject * -wrapper_reduce(wrapperobject *wp) +wrapper_reduce(wrapperobject *wp, PyObject *Py_UNUSED(ignored)) { PyObject *builtins; PyObject *getattr; diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 7a1bceb..40d7d8a 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -2511,7 +2511,7 @@ _PyDict_MergeEx(PyObject *a, PyObject *b, int override) } static PyObject * -dict_copy(PyDictObject *mp) +dict_copy(PyDictObject *mp, PyObject *Py_UNUSED(ignored)) { return PyDict_Copy((PyObject*)mp); } @@ -2874,7 +2874,7 @@ dict_setdefault_impl(PyDictObject *self, PyObject *key, } static PyObject * -dict_clear(PyDictObject *mp) +dict_clear(PyDictObject *mp, PyObject *Py_UNUSED(ignored)) { PyDict_Clear((PyObject *)mp); Py_RETURN_NONE; @@ -2892,7 +2892,7 @@ dict_pop(PyDictObject *mp, PyObject *args) } static PyObject * -dict_popitem(PyDictObject *mp) +dict_popitem(PyDictObject *mp, PyObject *Py_UNUSED(ignored)) { Py_ssize_t i, j; PyDictKeyEntry *ep0, *ep; @@ -3020,7 +3020,7 @@ _PyDict_KeysSize(PyDictKeysObject *keys) } static PyObject * -dict_sizeof(PyDictObject *mp) +dict_sizeof(PyDictObject *mp, PyObject *Py_UNUSED(ignored)) { return PyLong_FromSsize_t(_PyDict_SizeOf(mp)); } @@ -3051,9 +3051,9 @@ PyDoc_STRVAR(copy__doc__, "D.copy() -> a shallow copy of D"); /* Forward */ -static PyObject *dictkeys_new(PyObject *); -static PyObject *dictitems_new(PyObject *); -static PyObject *dictvalues_new(PyObject *); +static PyObject *dictkeys_new(PyObject *, PyObject *); +static PyObject *dictitems_new(PyObject *, PyObject *); +static PyObject *dictvalues_new(PyObject *, PyObject *); PyDoc_STRVAR(keys__doc__, "D.keys() -> a set-like object providing a view on D's keys"); @@ -3074,11 +3074,11 @@ static PyMethodDef mapp_methods[] = { pop__doc__}, {"popitem", (PyCFunction)dict_popitem, METH_NOARGS, popitem__doc__}, - {"keys", (PyCFunction)dictkeys_new, METH_NOARGS, + {"keys", dictkeys_new, METH_NOARGS, keys__doc__}, - {"items", (PyCFunction)dictitems_new, METH_NOARGS, + {"items", dictitems_new, METH_NOARGS, items__doc__}, - {"values", (PyCFunction)dictvalues_new, METH_NOARGS, + {"values", dictvalues_new, METH_NOARGS, values__doc__}, {"update", (PyCFunction)dict_update, METH_VARARGS | METH_KEYWORDS, update__doc__}, @@ -3361,7 +3361,7 @@ dictiter_traverse(dictiterobject *di, visitproc visit, void *arg) } static PyObject * -dictiter_len(dictiterobject *di) +dictiter_len(dictiterobject *di, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (di->di_dict != NULL && di->di_used == di->di_dict->ma_used) @@ -3373,7 +3373,7 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -dictiter_reduce(dictiterobject *di); +dictiter_reduce(dictiterobject *di, PyObject *Py_UNUSED(ignored)); PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); @@ -3652,7 +3652,7 @@ PyTypeObject PyDictIterItem_Type = { static PyObject * -dictiter_reduce(dictiterobject *di) +dictiter_reduce(dictiterobject *di, PyObject *Py_UNUSED(ignored)) { PyObject *list; dictiterobject tmp; @@ -4092,7 +4092,7 @@ PyTypeObject PyDictKeys_Type = { }; static PyObject * -dictkeys_new(PyObject *dict) +dictkeys_new(PyObject *dict, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(dict, &PyDictKeys_Type); } @@ -4182,7 +4182,7 @@ PyTypeObject PyDictItems_Type = { }; static PyObject * -dictitems_new(PyObject *dict) +dictitems_new(PyObject *dict, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(dict, &PyDictItems_Type); } @@ -4247,7 +4247,7 @@ PyTypeObject PyDictValues_Type = { }; static PyObject * -dictvalues_new(PyObject *dict) +dictvalues_new(PyObject *dict, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(dict, &PyDictValues_Type); } diff --git a/Objects/enumobject.c b/Objects/enumobject.c index 4d0af14..d993a50 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -189,7 +189,7 @@ enum_next(enumobject *en) } static PyObject * -enum_reduce(enumobject *en) +enum_reduce(enumobject *en, PyObject *Py_UNUSED(ignored)) { if (en->en_longindex != NULL) return Py_BuildValue("O(OO)", Py_TYPE(en), en->en_sit, en->en_longindex); @@ -349,7 +349,7 @@ reversed_next(reversedobject *ro) } static PyObject * -reversed_len(reversedobject *ro) +reversed_len(reversedobject *ro, PyObject *Py_UNUSED(ignored)) { Py_ssize_t position, seqsize; @@ -365,7 +365,7 @@ reversed_len(reversedobject *ro) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -reversed_reduce(reversedobject *ro) +reversed_reduce(reversedobject *ro, PyObject *Py_UNUSED(ignored)) { if (ro->seq) return Py_BuildValue("O(O)n", Py_TYPE(ro), ro->seq, ro->index); diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 2cce40f..bfc818f 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -126,7 +126,7 @@ BaseException_repr(PyBaseExceptionObject *self) /* Pickling support */ static PyObject * -BaseException_reduce(PyBaseExceptionObject *self) +BaseException_reduce(PyBaseExceptionObject *self, PyObject *Py_UNUSED(ignored)) { if (self->args && self->dict) return PyTuple_Pack(3, Py_TYPE(self), self->args, self->dict); @@ -713,7 +713,7 @@ ImportError_getstate(PyImportErrorObject *self) /* Pickling support */ static PyObject * -ImportError_reduce(PyImportErrorObject *self) +ImportError_reduce(PyImportErrorObject *self, PyObject *Py_UNUSED(ignored)) { PyObject *res; PyObject *args; @@ -1123,7 +1123,7 @@ OSError_str(PyOSErrorObject *self) } static PyObject * -OSError_reduce(PyOSErrorObject *self) +OSError_reduce(PyOSErrorObject *self, PyObject *Py_UNUSED(ignored)) { PyObject *args = self->args; PyObject *res = NULL, *tmp; diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 0f71944..db788a9 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -398,7 +398,7 @@ stdprinter_write(PyStdPrinter_Object *self, PyObject *args) } static PyObject * -stdprinter_fileno(PyStdPrinter_Object *self) +stdprinter_fileno(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored)) { return PyLong_FromLong((long) self->fd); } @@ -411,13 +411,13 @@ stdprinter_repr(PyStdPrinter_Object *self) } static PyObject * -stdprinter_noop(PyStdPrinter_Object *self) +stdprinter_noop(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored)) { Py_RETURN_NONE; } static PyObject * -stdprinter_isatty(PyStdPrinter_Object *self) +stdprinter_isatty(PyStdPrinter_Object *self, PyObject *Py_UNUSED(ignored)) { long res; if (self->fd < 0) { diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 14935a2..64ee386 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -500,7 +500,7 @@ frame_tp_clear(PyFrameObject *f) } static PyObject * -frame_clear(PyFrameObject *f) +frame_clear(PyFrameObject *f, PyObject *Py_UNUSED(ignored)) { if (f->f_executing) { PyErr_SetString(PyExc_RuntimeError, @@ -519,7 +519,7 @@ PyDoc_STRVAR(clear__doc__, "F.clear(): clear most references held by the frame"); static PyObject * -frame_sizeof(PyFrameObject *f) +frame_sizeof(PyFrameObject *f, PyObject *Py_UNUSED(ignored)) { Py_ssize_t res, extras, ncells, nfrees; diff --git a/Objects/iterobject.c b/Objects/iterobject.c index 252169a..5f5ebfc 100644 --- a/Objects/iterobject.c +++ b/Objects/iterobject.c @@ -78,7 +78,7 @@ iter_iternext(PyObject *iterator) } static PyObject * -iter_len(seqiterobject *it) +iter_len(seqiterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t seqsize, len; @@ -101,7 +101,7 @@ iter_len(seqiterobject *it) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -iter_reduce(seqiterobject *it) +iter_reduce(seqiterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_seq != NULL) return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"), @@ -240,7 +240,7 @@ calliter_iternext(calliterobject *it) } static PyObject * -calliter_reduce(calliterobject *it) +calliter_reduce(calliterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_callable != NULL && it->it_sentinel != NULL) return Py_BuildValue("N(OO)", _PyObject_GetBuiltin("iter"), diff --git a/Objects/listobject.c b/Objects/listobject.c index c8ffeff..4108f50 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2983,9 +2983,9 @@ typedef struct { static void listiter_dealloc(listiterobject *); static int listiter_traverse(listiterobject *, visitproc, void *); static PyObject *listiter_next(listiterobject *); -static PyObject *listiter_len(listiterobject *); +static PyObject *listiter_len(listiterobject *, PyObject *); static PyObject *listiter_reduce_general(void *_it, int forward); -static PyObject *listiter_reduce(listiterobject *); +static PyObject *listiter_reduce(listiterobject *, PyObject *); static PyObject *listiter_setstate(listiterobject *, PyObject *state); PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); @@ -3092,7 +3092,7 @@ listiter_next(listiterobject *it) } static PyObject * -listiter_len(listiterobject *it) +listiter_len(listiterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len; if (it->it_seq) { @@ -3104,7 +3104,7 @@ listiter_len(listiterobject *it) } static PyObject * -listiter_reduce(listiterobject *it) +listiter_reduce(listiterobject *it, PyObject *Py_UNUSED(ignored)) { return listiter_reduce_general(it, 1); } @@ -3136,8 +3136,8 @@ typedef struct { static void listreviter_dealloc(listreviterobject *); static int listreviter_traverse(listreviterobject *, visitproc, void *); static PyObject *listreviter_next(listreviterobject *); -static PyObject *listreviter_len(listreviterobject *); -static PyObject *listreviter_reduce(listreviterobject *); +static PyObject *listreviter_len(listreviterobject *, PyObject *); +static PyObject *listreviter_reduce(listreviterobject *, PyObject *); static PyObject *listreviter_setstate(listreviterobject *, PyObject *); static PyMethodDef listreviter_methods[] = { @@ -3246,7 +3246,7 @@ listreviter_next(listreviterobject *it) } static PyObject * -listreviter_len(listreviterobject *it) +listreviter_len(listreviterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = it->it_index + 1; if (it->it_seq == NULL || PyList_GET_SIZE(it->it_seq) < len) @@ -3255,7 +3255,7 @@ listreviter_len(listreviterobject *it) } static PyObject * -listreviter_reduce(listreviterobject *it) +listreviter_reduce(listreviterobject *it, PyObject *Py_UNUSED(ignored)) { return listiter_reduce_general(it, 0); } diff --git a/Objects/longobject.c b/Objects/longobject.c index 269d6cd..1c5ab3b 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2537,7 +2537,7 @@ PyLong_FromUnicodeObject(PyObject *u, int base) /* forward */ static PyLongObject *x_divrem (PyLongObject *, PyLongObject *, PyLongObject **); -static PyObject *long_long(PyObject *v); +static PyObject *long_long(PyObject *v, PyObject *Py_UNUSED(ignored)); /* Int division with remainder, top-level routine */ @@ -2557,7 +2557,7 @@ long_divrem(PyLongObject *a, PyLongObject *b, (size_a == size_b && a->ob_digit[size_a-1] < b->ob_digit[size_b-1])) { /* |a| < |b|. */ - *prem = (PyLongObject *)long_long((PyObject *)a); + *prem = (PyLongObject *)long_long((PyObject *)a, NULL); if (*prem == NULL) { return -1; } @@ -4242,7 +4242,7 @@ long_abs(PyLongObject *v) if (Py_SIZE(v) < 0) return long_neg(v); else - return long_long((PyObject *)v); + return long_long((PyObject *)v, NULL); } static int @@ -4554,7 +4554,7 @@ long_or(PyObject *a, PyObject *b) } static PyObject * -long_long(PyObject *v) +long_long(PyObject *v, PyObject *Py_UNUSED(ignored)) { if (PyLong_CheckExact(v)) Py_INCREF(v); @@ -5028,7 +5028,7 @@ long_round(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|O", &o_ndigits)) return NULL; if (o_ndigits == NULL) - return long_long(self); + return long_long(self, NULL); ndigits = PyNumber_Index(o_ndigits); if (ndigits == NULL) @@ -5037,7 +5037,7 @@ long_round(PyObject *self, PyObject *args) /* if ndigits >= 0 then no rounding is necessary; return self unchanged */ if (Py_SIZE(ndigits) >= 0) { Py_DECREF(ndigits); - return long_long(self); + return long_long(self, NULL); } /* result = self - divmod_near(self, 10 ** -ndigits)[1] */ @@ -5279,7 +5279,7 @@ int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj, } static PyMethodDef long_methods[] = { - {"conjugate", (PyCFunction)long_long, METH_NOARGS, + {"conjugate", long_long, METH_NOARGS, "Returns self, the complex conjugate of any int."}, INT_BIT_LENGTH_METHODDEF #if 0 @@ -5288,11 +5288,11 @@ static PyMethodDef long_methods[] = { #endif INT_TO_BYTES_METHODDEF INT_FROM_BYTES_METHODDEF - {"__trunc__", (PyCFunction)long_long, METH_NOARGS, + {"__trunc__", long_long, METH_NOARGS, "Truncating an Integral returns itself."}, - {"__floor__", (PyCFunction)long_long, METH_NOARGS, + {"__floor__", long_long, METH_NOARGS, "Flooring an Integral returns itself."}, - {"__ceil__", (PyCFunction)long_long, METH_NOARGS, + {"__ceil__", long_long, METH_NOARGS, "Ceiling of an Integral returns itself."}, {"__round__", (PyCFunction)long_round, METH_VARARGS, "Rounding an Integral returns itself.\n" diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 2cf3146..9606768 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -101,7 +101,7 @@ meth_dealloc(PyCFunctionObject *m) } static PyObject * -meth_reduce(PyCFunctionObject *m) +meth_reduce(PyCFunctionObject *m, PyObject *Py_UNUSED(ignored)) { PyObject *builtins; PyObject *getattr; diff --git a/Objects/namespaceobject.c b/Objects/namespaceobject.c index e5698e6..a6c941a 100644 --- a/Objects/namespaceobject.c +++ b/Objects/namespaceobject.c @@ -173,7 +173,7 @@ namespace_richcompare(PyObject *self, PyObject *other, int op) PyDoc_STRVAR(namespace_reduce__doc__, "Return state information for pickling"); static PyObject * -namespace_reduce(_PyNamespaceObject *ns) +namespace_reduce(_PyNamespaceObject *ns, PyObject *Py_UNUSED(ignored)) { PyObject *result, *args = PyTuple_New(0); diff --git a/Objects/object.c b/Objects/object.c index 220aa90..6532c3b 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1619,13 +1619,13 @@ NotImplemented_repr(PyObject *op) } static PyObject * -NotImplemented_reduce(PyObject *op) +NotImplemented_reduce(PyObject *op, PyObject *Py_UNUSED(ignored)) { return PyUnicode_FromString("NotImplemented"); } static PyMethodDef notimplemented_methods[] = { - {"__reduce__", (PyCFunction)NotImplemented_reduce, METH_NOARGS, NULL}, + {"__reduce__", NotImplemented_reduce, METH_NOARGS, NULL}, {NULL, NULL} }; diff --git a/Objects/odictobject.c b/Objects/odictobject.c index ac97f52..2040715 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -884,7 +884,7 @@ OrderedDict_fromkeys_impl(PyTypeObject *type, PyObject *seq, PyObject *value) PyDoc_STRVAR(odict_sizeof__doc__, ""); static PyObject * -odict_sizeof(PyODictObject *od) +odict_sizeof(PyODictObject *od, PyObject *Py_UNUSED(ignored)) { Py_ssize_t res = _PyDict_SizeOf((PyDictObject *)od); res += sizeof(_ODictNode *) * _odict_FAST_SIZE(od); /* od_fast_nodes */ @@ -899,7 +899,7 @@ odict_sizeof(PyODictObject *od) PyDoc_STRVAR(odict_reduce__doc__, "Return state information for pickling"); static PyObject * -odict_reduce(register PyODictObject *od) +odict_reduce(register PyODictObject *od, PyObject *Py_UNUSED(ignored)) { _Py_IDENTIFIER(__dict__); _Py_IDENTIFIER(items); @@ -1143,21 +1143,21 @@ OrderedDict_popitem_impl(PyODictObject *self, int last) /* MutableMapping.keys() does not have a docstring. */ PyDoc_STRVAR(odict_keys__doc__, ""); -static PyObject * odictkeys_new(PyObject *od); /* forward */ +static PyObject * odictkeys_new(PyObject *od, PyObject *Py_UNUSED(ignored)); /* forward */ /* values() */ /* MutableMapping.values() does not have a docstring. */ PyDoc_STRVAR(odict_values__doc__, ""); -static PyObject * odictvalues_new(PyObject *od); /* forward */ +static PyObject * odictvalues_new(PyObject *od, PyObject *Py_UNUSED(ignored)); /* forward */ /* items() */ /* MutableMapping.items() does not have a docstring. */ PyDoc_STRVAR(odict_items__doc__, ""); -static PyObject * odictitems_new(PyObject *od); /* forward */ +static PyObject * odictitems_new(PyObject *od, PyObject *Py_UNUSED(ignored)); /* forward */ /* update() */ @@ -1175,7 +1175,7 @@ PyDoc_STRVAR(odict_clear__doc__, "od.clear() -> None. Remove all items from od."); static PyObject * -odict_clear(register PyODictObject *od) +odict_clear(register PyODictObject *od, PyObject *Py_UNUSED(ignored)) { PyDict_Clear((PyObject *)od); _odict_clear_nodes(od); @@ -1193,7 +1193,7 @@ static int _PyODict_SetItem_KnownHash(PyObject *, PyObject *, PyObject *, PyDoc_STRVAR(odict_copy__doc__, "od.copy() -> a shallow copy of od"); static PyObject * -odict_copy(register PyODictObject *od) +odict_copy(register PyODictObject *od, PyObject *Py_UNUSED(ignored)) { _ODictNode *node; PyObject *od_copy; @@ -1252,7 +1252,7 @@ PyDoc_STRVAR(odict_reversed__doc__, "od.__reversed__() <==> reversed(od)"); static PyObject * odictiter_new(PyODictObject *, int); static PyObject * -odict_reversed(PyODictObject *od) +odict_reversed(PyODictObject *od, PyObject *Py_UNUSED(ignored)) { return odictiter_new(od, _odict_ITER_KEYS|_odict_ITER_REVERSED); } @@ -1322,11 +1322,11 @@ static PyMethodDef odict_methods[] = { {"pop", (PyCFunction)odict_pop, METH_VARARGS | METH_KEYWORDS, odict_pop__doc__}, ORDEREDDICT_POPITEM_METHODDEF - {"keys", (PyCFunction)odictkeys_new, METH_NOARGS, + {"keys", odictkeys_new, METH_NOARGS, odict_keys__doc__}, - {"values", (PyCFunction)odictvalues_new, METH_NOARGS, + {"values", odictvalues_new, METH_NOARGS, odict_values__doc__}, - {"items", (PyCFunction)odictitems_new, METH_NOARGS, + {"items", odictitems_new, METH_NOARGS, odict_items__doc__}, {"update", (PyCFunction)odict_update, METH_VARARGS | METH_KEYWORDS, odict_update__doc__}, @@ -1487,7 +1487,7 @@ odict_tp_clear(PyODictObject *od) PyObject *res; Py_CLEAR(od->od_inst_dict); Py_CLEAR(od->od_weakreflist); - res = odict_clear(od); + res = odict_clear(od, NULL); if (res == NULL) return -1; Py_DECREF(res); @@ -1956,7 +1956,7 @@ odictkeys_iter(_PyDictViewObject *dv) } static PyObject * -odictkeys_reversed(_PyDictViewObject *dv) +odictkeys_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored)) { if (dv->dv_dict == NULL) { Py_RETURN_NONE; @@ -2005,7 +2005,7 @@ PyTypeObject PyODictKeys_Type = { }; static PyObject * -odictkeys_new(PyObject *od) +odictkeys_new(PyObject *od, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(od, &PyODictKeys_Type); } @@ -2023,7 +2023,7 @@ odictitems_iter(_PyDictViewObject *dv) } static PyObject * -odictitems_reversed(_PyDictViewObject *dv) +odictitems_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored)) { if (dv->dv_dict == NULL) { Py_RETURN_NONE; @@ -2072,7 +2072,7 @@ PyTypeObject PyODictItems_Type = { }; static PyObject * -odictitems_new(PyObject *od) +odictitems_new(PyObject *od, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(od, &PyODictItems_Type); } @@ -2090,7 +2090,7 @@ odictvalues_iter(_PyDictViewObject *dv) } static PyObject * -odictvalues_reversed(_PyDictViewObject *dv) +odictvalues_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored)) { if (dv->dv_dict == NULL) { Py_RETURN_NONE; @@ -2139,7 +2139,7 @@ PyTypeObject PyODictValues_Type = { }; static PyObject * -odictvalues_new(PyObject *od) +odictvalues_new(PyObject *od, PyObject *Py_UNUSED(ignored)) { return _PyDictView_New(od, &PyODictValues_Type); } diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index dd0e4be..28a244e 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -636,7 +636,7 @@ static PyNumberMethods range_as_number = { }; static PyObject * range_iter(PyObject *seq); -static PyObject * range_reverse(PyObject *seq); +static PyObject * range_reverse(PyObject *seq, PyObject *Py_UNUSED(ignored)); PyDoc_STRVAR(reverse_doc, "Return a reverse iterator."); @@ -649,7 +649,7 @@ PyDoc_STRVAR(index_doc, "Raise ValueError if the value is not present."); static PyMethodDef range_methods[] = { - {"__reversed__", (PyCFunction)range_reverse, METH_NOARGS, reverse_doc}, + {"__reversed__", range_reverse, METH_NOARGS, reverse_doc}, {"__reduce__", (PyCFunction)range_reduce, METH_VARARGS}, {"count", (PyCFunction)range_count, METH_O, count_doc}, {"index", (PyCFunction)range_index, METH_O, index_doc}, @@ -731,7 +731,7 @@ rangeiter_next(rangeiterobject *r) } static PyObject * -rangeiter_len(rangeiterobject *r) +rangeiter_len(rangeiterobject *r, PyObject *Py_UNUSED(ignored)) { return PyLong_FromLong(r->len - r->index); } @@ -740,7 +740,7 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -rangeiter_reduce(rangeiterobject *r) +rangeiter_reduce(rangeiterobject *r, PyObject *Py_UNUSED(ignored)) { PyObject *start=NULL, *stop=NULL, *step=NULL; PyObject *range; @@ -896,7 +896,7 @@ longrangeiter_len(longrangeiterobject *r, PyObject *no_args) } static PyObject * -longrangeiter_reduce(longrangeiterobject *r) +longrangeiter_reduce(longrangeiterobject *r, PyObject *Py_UNUSED(ignored)) { PyObject *product, *stop=NULL; PyObject *range; @@ -1081,7 +1081,7 @@ range_iter(PyObject *seq) } static PyObject * -range_reverse(PyObject *seq) +range_reverse(PyObject *seq, PyObject *Py_UNUSED(ignored)) { rangeobject *range = (rangeobject*) seq; longrangeiterobject *it; diff --git a/Objects/setobject.c b/Objects/setobject.c index 47db6b2..80101dd 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -703,7 +703,7 @@ set_merge(PySetObject *so, PyObject *otherset) } static PyObject * -set_pop(PySetObject *so) +set_pop(PySetObject *so, PyObject *Py_UNUSED(ignored)) { /* Make sure the search finger is in bounds */ Py_ssize_t i = so->finger & so->mask; @@ -833,7 +833,7 @@ setiter_traverse(setiterobject *si, visitproc visit, void *arg) } static PyObject * -setiter_len(setiterobject *si) +setiter_len(setiterobject *si, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (si->si_set != NULL && si->si_used == si->si_set->used) @@ -846,7 +846,7 @@ PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list( static PyObject *setiter_iternext(setiterobject *si); static PyObject * -setiter_reduce(setiterobject *si) +setiter_reduce(setiterobject *si, PyObject *Py_UNUSED(ignored)) { PyObject *list; setiterobject tmp; @@ -1175,25 +1175,25 @@ set_swap_bodies(PySetObject *a, PySetObject *b) } static PyObject * -set_copy(PySetObject *so) +set_copy(PySetObject *so, PyObject *Py_UNUSED(ignored)) { return make_new_set_basetype(Py_TYPE(so), (PyObject *)so); } static PyObject * -frozenset_copy(PySetObject *so) +frozenset_copy(PySetObject *so, PyObject *Py_UNUSED(ignored)) { if (PyFrozenSet_CheckExact(so)) { Py_INCREF(so); return (PyObject *)so; } - return set_copy(so); + return set_copy(so, NULL); } PyDoc_STRVAR(copy_doc, "Return a shallow copy of a set."); static PyObject * -set_clear(PySetObject *so) +set_clear(PySetObject *so, PyObject *Py_UNUSED(ignored)) { set_clear_internal(so); Py_RETURN_NONE; @@ -1208,7 +1208,7 @@ set_union(PySetObject *so, PyObject *args) PyObject *other; Py_ssize_t i; - result = (PySetObject *)set_copy(so); + result = (PySetObject *)set_copy(so, NULL); if (result == NULL) return NULL; @@ -1237,7 +1237,7 @@ set_or(PySetObject *so, PyObject *other) if (!PyAnySet_Check(so) || !PyAnySet_Check(other)) Py_RETURN_NOTIMPLEMENTED; - result = (PySetObject *)set_copy(so); + result = (PySetObject *)set_copy(so, NULL); if (result == NULL) return NULL; if ((PyObject *)so == other) @@ -1270,7 +1270,7 @@ set_intersection(PySetObject *so, PyObject *other) int rv; if ((PyObject *)so == other) - return set_copy(so); + return set_copy(so, NULL); result = (PySetObject *)make_new_set_basetype(Py_TYPE(so), NULL); if (result == NULL) @@ -1343,7 +1343,7 @@ set_intersection_multi(PySetObject *so, PyObject *args) PyObject *result = (PyObject *)so; if (PyTuple_GET_SIZE(args) == 0) - return set_copy(so); + return set_copy(so, NULL); Py_INCREF(so); for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) { @@ -1542,7 +1542,7 @@ set_copy_and_difference(PySetObject *so, PyObject *other) { PyObject *result; - result = set_copy(so); + result = set_copy(so, NULL); if (result == NULL) return NULL; if (set_difference_update_internal((PySetObject *) result, other) == 0) @@ -1562,7 +1562,7 @@ set_difference(PySetObject *so, PyObject *other) int rv; if (PySet_GET_SIZE(so) == 0) { - return set_copy(so); + return set_copy(so, NULL); } if (PyAnySet_Check(other)) { @@ -1630,7 +1630,7 @@ set_difference_multi(PySetObject *so, PyObject *args) PyObject *result, *other; if (PyTuple_GET_SIZE(args) == 0) - return set_copy(so); + return set_copy(so, NULL); other = PyTuple_GET_ITEM(args, 0); result = set_difference(so, other); @@ -1681,7 +1681,7 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other) int rv; if ((PyObject *)so == other) - return set_clear(so); + return set_clear(so, NULL); if (PyDict_CheckExact(other)) { PyObject *value; @@ -1976,7 +1976,7 @@ PyDoc_STRVAR(discard_doc, If the element is not a member, do nothing."); static PyObject * -set_reduce(PySetObject *so) +set_reduce(PySetObject *so, PyObject *Py_UNUSED(ignored)) { PyObject *keys=NULL, *args=NULL, *result=NULL, *dict=NULL; _Py_IDENTIFIER(__dict__); @@ -2002,7 +2002,7 @@ done: } static PyObject * -set_sizeof(PySetObject *so) +set_sizeof(PySetObject *so, PyObject *Py_UNUSED(ignored)) { Py_ssize_t res; @@ -2044,7 +2044,7 @@ static PySequenceMethods set_as_sequence = { /* set object ********************************************************/ #ifdef Py_DEBUG -static PyObject *test_c_api(PySetObject *so); +static PyObject *test_c_api(PySetObject *so, PyObject *Py_UNUSED(ignored)); PyDoc_STRVAR(test_c_api_doc, "Exercises C API. Returns True.\n\ All is well if assertions don't fail."); @@ -2379,7 +2379,7 @@ PySet_Pop(PyObject *set) PyErr_BadInternalCall(); return NULL; } - return set_pop((PySetObject *)set); + return set_pop((PySetObject *)set, NULL); } int @@ -2408,7 +2408,7 @@ PyObject *_PySet_Dummy = dummy; } while(0) static PyObject * -test_c_api(PySetObject *so) +test_c_api(PySetObject *so, PyObject *Py_UNUSED(ignored)) { Py_ssize_t count; const char *s; diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 59f084d..2288df5 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -36,13 +36,13 @@ ellipsis_repr(PyObject *op) } static PyObject * -ellipsis_reduce(PyObject *op) +ellipsis_reduce(PyObject *op, PyObject *Py_UNUSED(ignored)) { return PyUnicode_FromString("Ellipsis"); } static PyMethodDef ellipsis_methods[] = { - {"__reduce__", (PyCFunction)ellipsis_reduce, METH_NOARGS, NULL}, + {"__reduce__", ellipsis_reduce, METH_NOARGS, NULL}, {NULL, NULL} }; @@ -546,7 +546,7 @@ S. Out of bounds indices are clipped in a manner consistent with the\n\ handling of normal slices."); static PyObject * -slice_reduce(PySliceObject* self) +slice_reduce(PySliceObject* self, PyObject *Py_UNUSED(ignored)) { return Py_BuildValue("O(OOO)", Py_TYPE(self), self->start, self->stop, self->step); } diff --git a/Objects/stringlib/ctype.h b/Objects/stringlib/ctype.h index fd7b1bd..843cfa2 100644 --- a/Objects/stringlib/ctype.h +++ b/Objects/stringlib/ctype.h @@ -5,49 +5,49 @@ #include "bytes_methods.h" static PyObject* -stringlib_isspace(PyObject *self) +stringlib_isspace(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isspace(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_isalpha(PyObject *self) +stringlib_isalpha(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isalpha(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_isalnum(PyObject *self) +stringlib_isalnum(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isalnum(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_isascii(PyObject *self) +stringlib_isascii(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isascii(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_isdigit(PyObject *self) +stringlib_isdigit(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isdigit(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_islower(PyObject *self) +stringlib_islower(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_islower(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_isupper(PyObject *self) +stringlib_isupper(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_isupper(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } static PyObject* -stringlib_istitle(PyObject *self) +stringlib_istitle(PyObject *self, PyObject *Py_UNUSED(ignored)) { return _Py_bytes_istitle(STRINGLIB_STR(self), STRINGLIB_LEN(self)); } @@ -56,7 +56,7 @@ stringlib_istitle(PyObject *self) /* functions that return a new object partially translated by ctype funcs: */ static PyObject* -stringlib_lower(PyObject *self) +stringlib_lower(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject* newobj; newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self)); @@ -68,7 +68,7 @@ stringlib_lower(PyObject *self) } static PyObject* -stringlib_upper(PyObject *self) +stringlib_upper(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject* newobj; newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self)); @@ -80,7 +80,7 @@ stringlib_upper(PyObject *self) } static PyObject* -stringlib_title(PyObject *self) +stringlib_title(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject* newobj; newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self)); @@ -92,7 +92,7 @@ stringlib_title(PyObject *self) } static PyObject* -stringlib_capitalize(PyObject *self) +stringlib_capitalize(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject* newobj; newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self)); @@ -104,7 +104,7 @@ stringlib_capitalize(PyObject *self) } static PyObject* -stringlib_swapcase(PyObject *self) +stringlib_swapcase(PyObject *self, PyObject *Py_UNUSED(ignored)) { PyObject* newobj; newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self)); diff --git a/Objects/structseq.c b/Objects/structseq.c index 1b71f72..1705837 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -240,7 +240,7 @@ structseq_repr(PyStructSequence *obj) } static PyObject * -structseq_reduce(PyStructSequence* self) +structseq_reduce(PyStructSequence* self, PyObject *Py_UNUSED(ignored)) { PyObject* tup = NULL; PyObject* dict = NULL; diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 9bb91a5..e268f75 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -989,7 +989,7 @@ tupleiter_next(tupleiterobject *it) } static PyObject * -tupleiter_len(tupleiterobject *it) +tupleiter_len(tupleiterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (it->it_seq) @@ -1000,7 +1000,7 @@ tupleiter_len(tupleiterobject *it) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -tupleiter_reduce(tupleiterobject *it) +tupleiter_reduce(tupleiterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_seq) return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"), diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1ae2f5e..ce56b04 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -13792,7 +13792,7 @@ unicode_sizeof_impl(PyObject *self) } static PyObject * -unicode_getnewargs(PyObject *v) +unicode_getnewargs(PyObject *v, PyObject *Py_UNUSED(ignored)) { PyObject *copy = _PyUnicode_Copy(v); if (!copy) @@ -13853,7 +13853,7 @@ static PyMethodDef unicode_methods[] = { {"_decimal2ascii", (PyCFunction) unicode__decimal2ascii, METH_NOARGS}, #endif - {"__getnewargs__", (PyCFunction)unicode_getnewargs, METH_NOARGS}, + {"__getnewargs__", unicode_getnewargs, METH_NOARGS}, {NULL, NULL} }; @@ -15334,7 +15334,7 @@ unicodeiter_next(unicodeiterobject *it) } static PyObject * -unicodeiter_len(unicodeiterobject *it) +unicodeiter_len(unicodeiterobject *it, PyObject *Py_UNUSED(ignored)) { Py_ssize_t len = 0; if (it->it_seq) @@ -15345,7 +15345,7 @@ unicodeiter_len(unicodeiterobject *it) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static PyObject * -unicodeiter_reduce(unicodeiterobject *it) +unicodeiter_reduce(unicodeiterobject *it, PyObject *Py_UNUSED(ignored)) { if (it->it_seq != NULL) { return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"), diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index f600179..9f492e4 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -452,7 +452,7 @@ proxy_checkref(PyWeakReference *proxy) #define WRAP_METHOD(method, special) \ static PyObject * \ - method(PyObject *proxy) { \ + method(PyObject *proxy, PyObject *Py_UNUSED(ignored)) { \ _Py_IDENTIFIER(special); \ UNWRAP(proxy); \ return _PyObject_CallMethodId(proxy, &PyId_##special, NULL); \ @@ -602,7 +602,7 @@ WRAP_METHOD(proxy_bytes, __bytes__) static PyMethodDef proxy_methods[] = { - {"__bytes__", (PyCFunction)proxy_bytes, METH_NOARGS}, + {"__bytes__", proxy_bytes, METH_NOARGS}, {NULL, NULL} }; |