@@ -158,22 +158,26 @@ PyDoc_STRVAR(_io_BytesIO_read__doc__,
158158"Return an empty bytes object at EOF." );
159159
160160#define _IO_BYTESIO_READ_METHODDEF \
161- {"read", (PyCFunction)_io_BytesIO_read, METH_VARARGS , _io_BytesIO_read__doc__},
161+ {"read", (PyCFunction)_io_BytesIO_read, METH_FASTCALL , _io_BytesIO_read__doc__},
162162
163163static PyObject *
164164_io_BytesIO_read_impl (bytesio * self , PyObject * arg );
165165
166166static PyObject *
167- _io_BytesIO_read (bytesio * self , PyObject * args )
167+ _io_BytesIO_read (bytesio * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
168168{
169169 PyObject * return_value = NULL ;
170170 PyObject * arg = Py_None ;
171171
172- if (!PyArg_UnpackTuple (args , "read" ,
172+ if (!_PyArg_UnpackStack (args , nargs , "read" ,
173173 0 , 1 ,
174174 & arg )) {
175175 goto exit ;
176176 }
177+
178+ if (!_PyArg_NoStackKeywords ("read" , kwnames )) {
179+ goto exit ;
180+ }
177181 return_value = _io_BytesIO_read_impl (self , arg );
178182
179183exit :
@@ -190,22 +194,26 @@ PyDoc_STRVAR(_io_BytesIO_read1__doc__,
190194"Return an empty bytes object at EOF." );
191195
192196#define _IO_BYTESIO_READ1_METHODDEF \
193- {"read1", (PyCFunction)_io_BytesIO_read1, METH_VARARGS , _io_BytesIO_read1__doc__},
197+ {"read1", (PyCFunction)_io_BytesIO_read1, METH_FASTCALL , _io_BytesIO_read1__doc__},
194198
195199static PyObject *
196200_io_BytesIO_read1_impl (bytesio * self , PyObject * size );
197201
198202static PyObject *
199- _io_BytesIO_read1 (bytesio * self , PyObject * args )
203+ _io_BytesIO_read1 (bytesio * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
200204{
201205 PyObject * return_value = NULL ;
202206 PyObject * size = Py_None ;
203207
204- if (!PyArg_UnpackTuple (args , "read1" ,
208+ if (!_PyArg_UnpackStack (args , nargs , "read1" ,
205209 0 , 1 ,
206210 & size )) {
207211 goto exit ;
208212 }
213+
214+ if (!_PyArg_NoStackKeywords ("read1" , kwnames )) {
215+ goto exit ;
216+ }
209217 return_value = _io_BytesIO_read1_impl (self , size );
210218
211219exit :
@@ -223,22 +231,26 @@ PyDoc_STRVAR(_io_BytesIO_readline__doc__,
223231"Return an empty bytes object at EOF." );
224232
225233#define _IO_BYTESIO_READLINE_METHODDEF \
226- {"readline", (PyCFunction)_io_BytesIO_readline, METH_VARARGS , _io_BytesIO_readline__doc__},
234+ {"readline", (PyCFunction)_io_BytesIO_readline, METH_FASTCALL , _io_BytesIO_readline__doc__},
227235
228236static PyObject *
229237_io_BytesIO_readline_impl (bytesio * self , PyObject * arg );
230238
231239static PyObject *
232- _io_BytesIO_readline (bytesio * self , PyObject * args )
240+ _io_BytesIO_readline (bytesio * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
233241{
234242 PyObject * return_value = NULL ;
235243 PyObject * arg = Py_None ;
236244
237- if (!PyArg_UnpackTuple (args , "readline" ,
245+ if (!_PyArg_UnpackStack (args , nargs , "readline" ,
238246 0 , 1 ,
239247 & arg )) {
240248 goto exit ;
241249 }
250+
251+ if (!_PyArg_NoStackKeywords ("readline" , kwnames )) {
252+ goto exit ;
253+ }
242254 return_value = _io_BytesIO_readline_impl (self , arg );
243255
244256exit :
@@ -256,22 +268,26 @@ PyDoc_STRVAR(_io_BytesIO_readlines__doc__,
256268"total number of bytes in the lines returned." );
257269
258270#define _IO_BYTESIO_READLINES_METHODDEF \
259- {"readlines", (PyCFunction)_io_BytesIO_readlines, METH_VARARGS , _io_BytesIO_readlines__doc__},
271+ {"readlines", (PyCFunction)_io_BytesIO_readlines, METH_FASTCALL , _io_BytesIO_readlines__doc__},
260272
261273static PyObject *
262274_io_BytesIO_readlines_impl (bytesio * self , PyObject * arg );
263275
264276static PyObject *
265- _io_BytesIO_readlines (bytesio * self , PyObject * args )
277+ _io_BytesIO_readlines (bytesio * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
266278{
267279 PyObject * return_value = NULL ;
268280 PyObject * arg = Py_None ;
269281
270- if (!PyArg_UnpackTuple (args , "readlines" ,
282+ if (!_PyArg_UnpackStack (args , nargs , "readlines" ,
271283 0 , 1 ,
272284 & arg )) {
273285 goto exit ;
274286 }
287+
288+ if (!_PyArg_NoStackKeywords ("readlines" , kwnames )) {
289+ goto exit ;
290+ }
275291 return_value = _io_BytesIO_readlines_impl (self , arg );
276292
277293exit :
@@ -323,22 +339,26 @@ PyDoc_STRVAR(_io_BytesIO_truncate__doc__,
323339"The current file position is unchanged. Returns the new size." );
324340
325341#define _IO_BYTESIO_TRUNCATE_METHODDEF \
326- {"truncate", (PyCFunction)_io_BytesIO_truncate, METH_VARARGS , _io_BytesIO_truncate__doc__},
342+ {"truncate", (PyCFunction)_io_BytesIO_truncate, METH_FASTCALL , _io_BytesIO_truncate__doc__},
327343
328344static PyObject *
329345_io_BytesIO_truncate_impl (bytesio * self , PyObject * arg );
330346
331347static PyObject *
332- _io_BytesIO_truncate (bytesio * self , PyObject * args )
348+ _io_BytesIO_truncate (bytesio * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
333349{
334350 PyObject * return_value = NULL ;
335351 PyObject * arg = Py_None ;
336352
337- if (!PyArg_UnpackTuple (args , "truncate" ,
353+ if (!_PyArg_UnpackStack (args , nargs , "truncate" ,
338354 0 , 1 ,
339355 & arg )) {
340356 goto exit ;
341357 }
358+
359+ if (!_PyArg_NoStackKeywords ("truncate" , kwnames )) {
360+ goto exit ;
361+ }
342362 return_value = _io_BytesIO_truncate_impl (self , arg );
343363
344364exit :
@@ -452,4 +472,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
452472exit :
453473 return return_value ;
454474}
455- /*[clinic end generated code: output=056f24eece495a8f input=a9049054013a1b77]*/
475+ /*[clinic end generated code: output=138ee6ad6951bc84 input=a9049054013a1b77]*/
0 commit comments