@@ -131,61 +131,42 @@ type___sizeof__(PyTypeObject *self, PyObject *Py_UNUSED(ignored))
131131}
132132
133133PyDoc_STRVAR (object___reduce____doc__ ,
134- "__reduce__($self, protocol=0, /)\n"
134+ "__reduce__($self, /)\n"
135135"--\n"
136136"\n"
137137"Helper for pickle." );
138138
139139#define OBJECT___REDUCE___METHODDEF \
140- {"__reduce__", (PyCFunction)object___reduce__, METH_FASTCALL , object___reduce____doc__},
140+ {"__reduce__", (PyCFunction)object___reduce__, METH_NOARGS , object___reduce____doc__},
141141
142142static PyObject *
143- object___reduce___impl (PyObject * self , int protocol );
143+ object___reduce___impl (PyObject * self );
144144
145145static PyObject *
146- object___reduce__ (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
146+ object___reduce__ (PyObject * self , PyObject * Py_UNUSED ( ignored ) )
147147{
148- PyObject * return_value = NULL ;
149- int protocol = 0 ;
150-
151- if (!_PyArg_ParseStack (args , nargs , "|i:__reduce__" ,
152- & protocol )) {
153- goto exit ;
154- }
155-
156- if (!_PyArg_NoStackKeywords ("__reduce__" , kwnames )) {
157- goto exit ;
158- }
159- return_value = object___reduce___impl (self , protocol );
160-
161- exit :
162- return return_value ;
148+ return object___reduce___impl (self );
163149}
164150
165151PyDoc_STRVAR (object___reduce_ex____doc__ ,
166- "__reduce_ex__($self, protocol=0 , /)\n"
152+ "__reduce_ex__($self, protocol, /)\n"
167153"--\n"
168154"\n"
169155"Helper for pickle." );
170156
171157#define OBJECT___REDUCE_EX___METHODDEF \
172- {"__reduce_ex__", (PyCFunction)object___reduce_ex__, METH_FASTCALL , object___reduce_ex____doc__},
158+ {"__reduce_ex__", (PyCFunction)object___reduce_ex__, METH_O , object___reduce_ex____doc__},
173159
174160static PyObject *
175161object___reduce_ex___impl (PyObject * self , int protocol );
176162
177163static PyObject *
178- object___reduce_ex__ (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
164+ object___reduce_ex__ (PyObject * self , PyObject * arg )
179165{
180166 PyObject * return_value = NULL ;
181- int protocol = 0 ;
182-
183- if (!_PyArg_ParseStack (args , nargs , "|i:__reduce_ex__" ,
184- & protocol )) {
185- goto exit ;
186- }
167+ int protocol ;
187168
188- if (!_PyArg_NoStackKeywords ( " __reduce_ex__" , kwnames )) {
169+ if (!PyArg_Parse ( arg , "i: __reduce_ex__" , & protocol )) {
189170 goto exit ;
190171 }
191172 return_value = object___reduce_ex___impl (self , protocol );
@@ -256,4 +237,4 @@ object___dir__(PyObject *self, PyObject *Py_UNUSED(ignored))
256237{
257238 return object___dir___impl (self );
258239}
259- /*[clinic end generated code: output=ce354e436e2360a0 input=a9049054013a1b77]*/
240+ /*[clinic end generated code: output=8c4c856859564eaa input=a9049054013a1b77]*/
0 commit comments