1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4 
5 PyDoc_STRVAR(_io_IncrementalNewlineDecoder___init____doc__,
6 "IncrementalNewlineDecoder(decoder, translate, errors=\'strict\')\n"
7 "--\n"
8 "\n"
9 "Codec used when reading a file in universal newlines mode.\n"
10 "\n"
11 "It wraps another incremental decoder, translating \\r\\n and \\r into \\n.\n"
12 "It also records the types of newlines encountered.  When used with\n"
13 "translate=False, it ensures that the newline sequence is returned in\n"
14 "one piece. When used with decoder=None, it expects unicode strings as\n"
15 "decode input and translates newlines without first invoking an external\n"
16 "decoder.");
17 
18 static int
19 _io_IncrementalNewlineDecoder___init___impl(nldecoder_object *self,
20                                             PyObject *decoder, int translate,
21                                             PyObject *errors);
22 
23 static int
_io_IncrementalNewlineDecoder___init__(PyObject * self,PyObject * args,PyObject * kwargs)24 _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject *kwargs)
25 {
26     int return_value = -1;
27     static const char * const _keywords[] = {"decoder", "translate", "errors", NULL};
28     static _PyArg_Parser _parser = {NULL, _keywords, "IncrementalNewlineDecoder", 0};
29     PyObject *argsbuf[3];
30     PyObject * const *fastargs;
31     Py_ssize_t nargs = PyTuple_GET_SIZE(args);
32     Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 2;
33     PyObject *decoder;
34     int translate;
35     PyObject *errors = NULL;
36 
37     fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 2, 3, 0, argsbuf);
38     if (!fastargs) {
39         goto exit;
40     }
41     decoder = fastargs[0];
42     if (PyFloat_Check(fastargs[1])) {
43         PyErr_SetString(PyExc_TypeError,
44                         "integer argument expected, got float" );
45         goto exit;
46     }
47     translate = _PyLong_AsInt(fastargs[1]);
48     if (translate == -1 && PyErr_Occurred()) {
49         goto exit;
50     }
51     if (!noptargs) {
52         goto skip_optional_pos;
53     }
54     errors = fastargs[2];
55 skip_optional_pos:
56     return_value = _io_IncrementalNewlineDecoder___init___impl((nldecoder_object *)self, decoder, translate, errors);
57 
58 exit:
59     return return_value;
60 }
61 
62 PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__,
63 "decode($self, /, input, final=False)\n"
64 "--\n"
65 "\n");
66 
67 #define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF    \
68     {"decode", (PyCFunction)(void(*)(void))_io_IncrementalNewlineDecoder_decode, METH_FASTCALL|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
69 
70 static PyObject *
71 _io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
72                                           PyObject *input, int final);
73 
74 static PyObject *
_io_IncrementalNewlineDecoder_decode(nldecoder_object * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)75 _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
76 {
77     PyObject *return_value = NULL;
78     static const char * const _keywords[] = {"input", "final", NULL};
79     static _PyArg_Parser _parser = {NULL, _keywords, "decode", 0};
80     PyObject *argsbuf[2];
81     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
82     PyObject *input;
83     int final = 0;
84 
85     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
86     if (!args) {
87         goto exit;
88     }
89     input = args[0];
90     if (!noptargs) {
91         goto skip_optional_pos;
92     }
93     if (PyFloat_Check(args[1])) {
94         PyErr_SetString(PyExc_TypeError,
95                         "integer argument expected, got float" );
96         goto exit;
97     }
98     final = _PyLong_AsInt(args[1]);
99     if (final == -1 && PyErr_Occurred()) {
100         goto exit;
101     }
102 skip_optional_pos:
103     return_value = _io_IncrementalNewlineDecoder_decode_impl(self, input, final);
104 
105 exit:
106     return return_value;
107 }
108 
109 PyDoc_STRVAR(_io_IncrementalNewlineDecoder_getstate__doc__,
110 "getstate($self, /)\n"
111 "--\n"
112 "\n");
113 
114 #define _IO_INCREMENTALNEWLINEDECODER_GETSTATE_METHODDEF    \
115     {"getstate", (PyCFunction)_io_IncrementalNewlineDecoder_getstate, METH_NOARGS, _io_IncrementalNewlineDecoder_getstate__doc__},
116 
117 static PyObject *
118 _io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self);
119 
120 static PyObject *
_io_IncrementalNewlineDecoder_getstate(nldecoder_object * self,PyObject * Py_UNUSED (ignored))121 _io_IncrementalNewlineDecoder_getstate(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
122 {
123     return _io_IncrementalNewlineDecoder_getstate_impl(self);
124 }
125 
126 PyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__,
127 "setstate($self, state, /)\n"
128 "--\n"
129 "\n");
130 
131 #define _IO_INCREMENTALNEWLINEDECODER_SETSTATE_METHODDEF    \
132     {"setstate", (PyCFunction)_io_IncrementalNewlineDecoder_setstate, METH_O, _io_IncrementalNewlineDecoder_setstate__doc__},
133 
134 PyDoc_STRVAR(_io_IncrementalNewlineDecoder_reset__doc__,
135 "reset($self, /)\n"
136 "--\n"
137 "\n");
138 
139 #define _IO_INCREMENTALNEWLINEDECODER_RESET_METHODDEF    \
140     {"reset", (PyCFunction)_io_IncrementalNewlineDecoder_reset, METH_NOARGS, _io_IncrementalNewlineDecoder_reset__doc__},
141 
142 static PyObject *
143 _io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self);
144 
145 static PyObject *
_io_IncrementalNewlineDecoder_reset(nldecoder_object * self,PyObject * Py_UNUSED (ignored))146 _io_IncrementalNewlineDecoder_reset(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
147 {
148     return _io_IncrementalNewlineDecoder_reset_impl(self);
149 }
150 
151 PyDoc_STRVAR(_io_TextIOWrapper___init____doc__,
152 "TextIOWrapper(buffer, encoding=None, errors=None, newline=None,\n"
153 "              line_buffering=False, write_through=False)\n"
154 "--\n"
155 "\n"
156 "Character and line based layer over a BufferedIOBase object, buffer.\n"
157 "\n"
158 "encoding gives the name of the encoding that the stream will be\n"
159 "decoded or encoded with. It defaults to locale.getpreferredencoding(False).\n"
160 "\n"
161 "errors determines the strictness of encoding and decoding (see\n"
162 "help(codecs.Codec) or the documentation for codecs.register) and\n"
163 "defaults to \"strict\".\n"
164 "\n"
165 "newline controls how line endings are handled. It can be None, \'\',\n"
166 "\'\\n\', \'\\r\', and \'\\r\\n\'.  It works as follows:\n"
167 "\n"
168 "* On input, if newline is None, universal newlines mode is\n"
169 "  enabled. Lines in the input can end in \'\\n\', \'\\r\', or \'\\r\\n\', and\n"
170 "  these are translated into \'\\n\' before being returned to the\n"
171 "  caller. If it is \'\', universal newline mode is enabled, but line\n"
172 "  endings are returned to the caller untranslated. If it has any of\n"
173 "  the other legal values, input lines are only terminated by the given\n"
174 "  string, and the line ending is returned to the caller untranslated.\n"
175 "\n"
176 "* On output, if newline is None, any \'\\n\' characters written are\n"
177 "  translated to the system default line separator, os.linesep. If\n"
178 "  newline is \'\' or \'\\n\', no translation takes place. If newline is any\n"
179 "  of the other legal values, any \'\\n\' characters written are translated\n"
180 "  to the given string.\n"
181 "\n"
182 "If line_buffering is True, a call to flush is implied when a call to\n"
183 "write contains a newline character.");
184 
185 static int
186 _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
187                                 const char *encoding, PyObject *errors,
188                                 const char *newline, int line_buffering,
189                                 int write_through);
190 
191 static int
_io_TextIOWrapper___init__(PyObject * self,PyObject * args,PyObject * kwargs)192 _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
193 {
194     int return_value = -1;
195     static const char * const _keywords[] = {"buffer", "encoding", "errors", "newline", "line_buffering", "write_through", NULL};
196     static _PyArg_Parser _parser = {NULL, _keywords, "TextIOWrapper", 0};
197     PyObject *argsbuf[6];
198     PyObject * const *fastargs;
199     Py_ssize_t nargs = PyTuple_GET_SIZE(args);
200     Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 1;
201     PyObject *buffer;
202     const char *encoding = NULL;
203     PyObject *errors = Py_None;
204     const char *newline = NULL;
205     int line_buffering = 0;
206     int write_through = 0;
207 
208     fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 6, 0, argsbuf);
209     if (!fastargs) {
210         goto exit;
211     }
212     buffer = fastargs[0];
213     if (!noptargs) {
214         goto skip_optional_pos;
215     }
216     if (fastargs[1]) {
217         if (fastargs[1] == Py_None) {
218             encoding = NULL;
219         }
220         else if (PyUnicode_Check(fastargs[1])) {
221             Py_ssize_t encoding_length;
222             encoding = PyUnicode_AsUTF8AndSize(fastargs[1], &encoding_length);
223             if (encoding == NULL) {
224                 goto exit;
225             }
226             if (strlen(encoding) != (size_t)encoding_length) {
227                 PyErr_SetString(PyExc_ValueError, "embedded null character");
228                 goto exit;
229             }
230         }
231         else {
232             _PyArg_BadArgument("TextIOWrapper", "argument 'encoding'", "str or None", fastargs[1]);
233             goto exit;
234         }
235         if (!--noptargs) {
236             goto skip_optional_pos;
237         }
238     }
239     if (fastargs[2]) {
240         errors = fastargs[2];
241         if (!--noptargs) {
242             goto skip_optional_pos;
243         }
244     }
245     if (fastargs[3]) {
246         if (fastargs[3] == Py_None) {
247             newline = NULL;
248         }
249         else if (PyUnicode_Check(fastargs[3])) {
250             Py_ssize_t newline_length;
251             newline = PyUnicode_AsUTF8AndSize(fastargs[3], &newline_length);
252             if (newline == NULL) {
253                 goto exit;
254             }
255             if (strlen(newline) != (size_t)newline_length) {
256                 PyErr_SetString(PyExc_ValueError, "embedded null character");
257                 goto exit;
258             }
259         }
260         else {
261             _PyArg_BadArgument("TextIOWrapper", "argument 'newline'", "str or None", fastargs[3]);
262             goto exit;
263         }
264         if (!--noptargs) {
265             goto skip_optional_pos;
266         }
267     }
268     if (fastargs[4]) {
269         if (PyFloat_Check(fastargs[4])) {
270             PyErr_SetString(PyExc_TypeError,
271                             "integer argument expected, got float" );
272             goto exit;
273         }
274         line_buffering = _PyLong_AsInt(fastargs[4]);
275         if (line_buffering == -1 && PyErr_Occurred()) {
276             goto exit;
277         }
278         if (!--noptargs) {
279             goto skip_optional_pos;
280         }
281     }
282     if (PyFloat_Check(fastargs[5])) {
283         PyErr_SetString(PyExc_TypeError,
284                         "integer argument expected, got float" );
285         goto exit;
286     }
287     write_through = _PyLong_AsInt(fastargs[5]);
288     if (write_through == -1 && PyErr_Occurred()) {
289         goto exit;
290     }
291 skip_optional_pos:
292     return_value = _io_TextIOWrapper___init___impl((textio *)self, buffer, encoding, errors, newline, line_buffering, write_through);
293 
294 exit:
295     return return_value;
296 }
297 
298 PyDoc_STRVAR(_io_TextIOWrapper_reconfigure__doc__,
299 "reconfigure($self, /, *, encoding=None, errors=None, newline=None,\n"
300 "            line_buffering=None, write_through=None)\n"
301 "--\n"
302 "\n"
303 "Reconfigure the text stream with new parameters.\n"
304 "\n"
305 "This also does an implicit stream flush.");
306 
307 #define _IO_TEXTIOWRAPPER_RECONFIGURE_METHODDEF    \
308     {"reconfigure", (PyCFunction)(void(*)(void))_io_TextIOWrapper_reconfigure, METH_FASTCALL|METH_KEYWORDS, _io_TextIOWrapper_reconfigure__doc__},
309 
310 static PyObject *
311 _io_TextIOWrapper_reconfigure_impl(textio *self, PyObject *encoding,
312                                    PyObject *errors, PyObject *newline_obj,
313                                    PyObject *line_buffering_obj,
314                                    PyObject *write_through_obj);
315 
316 static PyObject *
_io_TextIOWrapper_reconfigure(textio * self,PyObject * const * args,Py_ssize_t nargs,PyObject * kwnames)317 _io_TextIOWrapper_reconfigure(textio *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
318 {
319     PyObject *return_value = NULL;
320     static const char * const _keywords[] = {"encoding", "errors", "newline", "line_buffering", "write_through", NULL};
321     static _PyArg_Parser _parser = {NULL, _keywords, "reconfigure", 0};
322     PyObject *argsbuf[5];
323     Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
324     PyObject *encoding = Py_None;
325     PyObject *errors = Py_None;
326     PyObject *newline_obj = NULL;
327     PyObject *line_buffering_obj = Py_None;
328     PyObject *write_through_obj = Py_None;
329 
330     args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, argsbuf);
331     if (!args) {
332         goto exit;
333     }
334     if (!noptargs) {
335         goto skip_optional_kwonly;
336     }
337     if (args[0]) {
338         encoding = args[0];
339         if (!--noptargs) {
340             goto skip_optional_kwonly;
341         }
342     }
343     if (args[1]) {
344         errors = args[1];
345         if (!--noptargs) {
346             goto skip_optional_kwonly;
347         }
348     }
349     if (args[2]) {
350         newline_obj = args[2];
351         if (!--noptargs) {
352             goto skip_optional_kwonly;
353         }
354     }
355     if (args[3]) {
356         line_buffering_obj = args[3];
357         if (!--noptargs) {
358             goto skip_optional_kwonly;
359         }
360     }
361     write_through_obj = args[4];
362 skip_optional_kwonly:
363     return_value = _io_TextIOWrapper_reconfigure_impl(self, encoding, errors, newline_obj, line_buffering_obj, write_through_obj);
364 
365 exit:
366     return return_value;
367 }
368 
369 PyDoc_STRVAR(_io_TextIOWrapper_detach__doc__,
370 "detach($self, /)\n"
371 "--\n"
372 "\n");
373 
374 #define _IO_TEXTIOWRAPPER_DETACH_METHODDEF    \
375     {"detach", (PyCFunction)_io_TextIOWrapper_detach, METH_NOARGS, _io_TextIOWrapper_detach__doc__},
376 
377 static PyObject *
378 _io_TextIOWrapper_detach_impl(textio *self);
379 
380 static PyObject *
_io_TextIOWrapper_detach(textio * self,PyObject * Py_UNUSED (ignored))381 _io_TextIOWrapper_detach(textio *self, PyObject *Py_UNUSED(ignored))
382 {
383     return _io_TextIOWrapper_detach_impl(self);
384 }
385 
386 PyDoc_STRVAR(_io_TextIOWrapper_write__doc__,
387 "write($self, text, /)\n"
388 "--\n"
389 "\n");
390 
391 #define _IO_TEXTIOWRAPPER_WRITE_METHODDEF    \
392     {"write", (PyCFunction)_io_TextIOWrapper_write, METH_O, _io_TextIOWrapper_write__doc__},
393 
394 static PyObject *
395 _io_TextIOWrapper_write_impl(textio *self, PyObject *text);
396 
397 static PyObject *
_io_TextIOWrapper_write(textio * self,PyObject * arg)398 _io_TextIOWrapper_write(textio *self, PyObject *arg)
399 {
400     PyObject *return_value = NULL;
401     PyObject *text;
402 
403     if (!PyUnicode_Check(arg)) {
404         _PyArg_BadArgument("write", "argument", "str", arg);
405         goto exit;
406     }
407     if (PyUnicode_READY(arg) == -1) {
408         goto exit;
409     }
410     text = arg;
411     return_value = _io_TextIOWrapper_write_impl(self, text);
412 
413 exit:
414     return return_value;
415 }
416 
417 PyDoc_STRVAR(_io_TextIOWrapper_read__doc__,
418 "read($self, size=-1, /)\n"
419 "--\n"
420 "\n");
421 
422 #define _IO_TEXTIOWRAPPER_READ_METHODDEF    \
423     {"read", (PyCFunction)(void(*)(void))_io_TextIOWrapper_read, METH_FASTCALL, _io_TextIOWrapper_read__doc__},
424 
425 static PyObject *
426 _io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
427 
428 static PyObject *
_io_TextIOWrapper_read(textio * self,PyObject * const * args,Py_ssize_t nargs)429 _io_TextIOWrapper_read(textio *self, PyObject *const *args, Py_ssize_t nargs)
430 {
431     PyObject *return_value = NULL;
432     Py_ssize_t n = -1;
433 
434     if (!_PyArg_CheckPositional("read", nargs, 0, 1)) {
435         goto exit;
436     }
437     if (nargs < 1) {
438         goto skip_optional;
439     }
440     if (!_Py_convert_optional_to_ssize_t(args[0], &n)) {
441         goto exit;
442     }
443 skip_optional:
444     return_value = _io_TextIOWrapper_read_impl(self, n);
445 
446 exit:
447     return return_value;
448 }
449 
450 PyDoc_STRVAR(_io_TextIOWrapper_readline__doc__,
451 "readline($self, size=-1, /)\n"
452 "--\n"
453 "\n");
454 
455 #define _IO_TEXTIOWRAPPER_READLINE_METHODDEF    \
456     {"readline", (PyCFunction)(void(*)(void))_io_TextIOWrapper_readline, METH_FASTCALL, _io_TextIOWrapper_readline__doc__},
457 
458 static PyObject *
459 _io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
460 
461 static PyObject *
_io_TextIOWrapper_readline(textio * self,PyObject * const * args,Py_ssize_t nargs)462 _io_TextIOWrapper_readline(textio *self, PyObject *const *args, Py_ssize_t nargs)
463 {
464     PyObject *return_value = NULL;
465     Py_ssize_t size = -1;
466 
467     if (!_PyArg_CheckPositional("readline", nargs, 0, 1)) {
468         goto exit;
469     }
470     if (nargs < 1) {
471         goto skip_optional;
472     }
473     if (PyFloat_Check(args[0])) {
474         PyErr_SetString(PyExc_TypeError,
475                         "integer argument expected, got float" );
476         goto exit;
477     }
478     {
479         Py_ssize_t ival = -1;
480         PyObject *iobj = PyNumber_Index(args[0]);
481         if (iobj != NULL) {
482             ival = PyLong_AsSsize_t(iobj);
483             Py_DECREF(iobj);
484         }
485         if (ival == -1 && PyErr_Occurred()) {
486             goto exit;
487         }
488         size = ival;
489     }
490 skip_optional:
491     return_value = _io_TextIOWrapper_readline_impl(self, size);
492 
493 exit:
494     return return_value;
495 }
496 
497 PyDoc_STRVAR(_io_TextIOWrapper_seek__doc__,
498 "seek($self, cookie, whence=0, /)\n"
499 "--\n"
500 "\n");
501 
502 #define _IO_TEXTIOWRAPPER_SEEK_METHODDEF    \
503     {"seek", (PyCFunction)(void(*)(void))_io_TextIOWrapper_seek, METH_FASTCALL, _io_TextIOWrapper_seek__doc__},
504 
505 static PyObject *
506 _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
507 
508 static PyObject *
_io_TextIOWrapper_seek(textio * self,PyObject * const * args,Py_ssize_t nargs)509 _io_TextIOWrapper_seek(textio *self, PyObject *const *args, Py_ssize_t nargs)
510 {
511     PyObject *return_value = NULL;
512     PyObject *cookieObj;
513     int whence = 0;
514 
515     if (!_PyArg_CheckPositional("seek", nargs, 1, 2)) {
516         goto exit;
517     }
518     cookieObj = args[0];
519     if (nargs < 2) {
520         goto skip_optional;
521     }
522     if (PyFloat_Check(args[1])) {
523         PyErr_SetString(PyExc_TypeError,
524                         "integer argument expected, got float" );
525         goto exit;
526     }
527     whence = _PyLong_AsInt(args[1]);
528     if (whence == -1 && PyErr_Occurred()) {
529         goto exit;
530     }
531 skip_optional:
532     return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
533 
534 exit:
535     return return_value;
536 }
537 
538 PyDoc_STRVAR(_io_TextIOWrapper_tell__doc__,
539 "tell($self, /)\n"
540 "--\n"
541 "\n");
542 
543 #define _IO_TEXTIOWRAPPER_TELL_METHODDEF    \
544     {"tell", (PyCFunction)_io_TextIOWrapper_tell, METH_NOARGS, _io_TextIOWrapper_tell__doc__},
545 
546 static PyObject *
547 _io_TextIOWrapper_tell_impl(textio *self);
548 
549 static PyObject *
_io_TextIOWrapper_tell(textio * self,PyObject * Py_UNUSED (ignored))550 _io_TextIOWrapper_tell(textio *self, PyObject *Py_UNUSED(ignored))
551 {
552     return _io_TextIOWrapper_tell_impl(self);
553 }
554 
555 PyDoc_STRVAR(_io_TextIOWrapper_truncate__doc__,
556 "truncate($self, pos=None, /)\n"
557 "--\n"
558 "\n");
559 
560 #define _IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF    \
561     {"truncate", (PyCFunction)(void(*)(void))_io_TextIOWrapper_truncate, METH_FASTCALL, _io_TextIOWrapper_truncate__doc__},
562 
563 static PyObject *
564 _io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
565 
566 static PyObject *
_io_TextIOWrapper_truncate(textio * self,PyObject * const * args,Py_ssize_t nargs)567 _io_TextIOWrapper_truncate(textio *self, PyObject *const *args, Py_ssize_t nargs)
568 {
569     PyObject *return_value = NULL;
570     PyObject *pos = Py_None;
571 
572     if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
573         goto exit;
574     }
575     if (nargs < 1) {
576         goto skip_optional;
577     }
578     pos = args[0];
579 skip_optional:
580     return_value = _io_TextIOWrapper_truncate_impl(self, pos);
581 
582 exit:
583     return return_value;
584 }
585 
586 PyDoc_STRVAR(_io_TextIOWrapper_fileno__doc__,
587 "fileno($self, /)\n"
588 "--\n"
589 "\n");
590 
591 #define _IO_TEXTIOWRAPPER_FILENO_METHODDEF    \
592     {"fileno", (PyCFunction)_io_TextIOWrapper_fileno, METH_NOARGS, _io_TextIOWrapper_fileno__doc__},
593 
594 static PyObject *
595 _io_TextIOWrapper_fileno_impl(textio *self);
596 
597 static PyObject *
_io_TextIOWrapper_fileno(textio * self,PyObject * Py_UNUSED (ignored))598 _io_TextIOWrapper_fileno(textio *self, PyObject *Py_UNUSED(ignored))
599 {
600     return _io_TextIOWrapper_fileno_impl(self);
601 }
602 
603 PyDoc_STRVAR(_io_TextIOWrapper_seekable__doc__,
604 "seekable($self, /)\n"
605 "--\n"
606 "\n");
607 
608 #define _IO_TEXTIOWRAPPER_SEEKABLE_METHODDEF    \
609     {"seekable", (PyCFunction)_io_TextIOWrapper_seekable, METH_NOARGS, _io_TextIOWrapper_seekable__doc__},
610 
611 static PyObject *
612 _io_TextIOWrapper_seekable_impl(textio *self);
613 
614 static PyObject *
_io_TextIOWrapper_seekable(textio * self,PyObject * Py_UNUSED (ignored))615 _io_TextIOWrapper_seekable(textio *self, PyObject *Py_UNUSED(ignored))
616 {
617     return _io_TextIOWrapper_seekable_impl(self);
618 }
619 
620 PyDoc_STRVAR(_io_TextIOWrapper_readable__doc__,
621 "readable($self, /)\n"
622 "--\n"
623 "\n");
624 
625 #define _IO_TEXTIOWRAPPER_READABLE_METHODDEF    \
626     {"readable", (PyCFunction)_io_TextIOWrapper_readable, METH_NOARGS, _io_TextIOWrapper_readable__doc__},
627 
628 static PyObject *
629 _io_TextIOWrapper_readable_impl(textio *self);
630 
631 static PyObject *
_io_TextIOWrapper_readable(textio * self,PyObject * Py_UNUSED (ignored))632 _io_TextIOWrapper_readable(textio *self, PyObject *Py_UNUSED(ignored))
633 {
634     return _io_TextIOWrapper_readable_impl(self);
635 }
636 
637 PyDoc_STRVAR(_io_TextIOWrapper_writable__doc__,
638 "writable($self, /)\n"
639 "--\n"
640 "\n");
641 
642 #define _IO_TEXTIOWRAPPER_WRITABLE_METHODDEF    \
643     {"writable", (PyCFunction)_io_TextIOWrapper_writable, METH_NOARGS, _io_TextIOWrapper_writable__doc__},
644 
645 static PyObject *
646 _io_TextIOWrapper_writable_impl(textio *self);
647 
648 static PyObject *
_io_TextIOWrapper_writable(textio * self,PyObject * Py_UNUSED (ignored))649 _io_TextIOWrapper_writable(textio *self, PyObject *Py_UNUSED(ignored))
650 {
651     return _io_TextIOWrapper_writable_impl(self);
652 }
653 
654 PyDoc_STRVAR(_io_TextIOWrapper_isatty__doc__,
655 "isatty($self, /)\n"
656 "--\n"
657 "\n");
658 
659 #define _IO_TEXTIOWRAPPER_ISATTY_METHODDEF    \
660     {"isatty", (PyCFunction)_io_TextIOWrapper_isatty, METH_NOARGS, _io_TextIOWrapper_isatty__doc__},
661 
662 static PyObject *
663 _io_TextIOWrapper_isatty_impl(textio *self);
664 
665 static PyObject *
_io_TextIOWrapper_isatty(textio * self,PyObject * Py_UNUSED (ignored))666 _io_TextIOWrapper_isatty(textio *self, PyObject *Py_UNUSED(ignored))
667 {
668     return _io_TextIOWrapper_isatty_impl(self);
669 }
670 
671 PyDoc_STRVAR(_io_TextIOWrapper_flush__doc__,
672 "flush($self, /)\n"
673 "--\n"
674 "\n");
675 
676 #define _IO_TEXTIOWRAPPER_FLUSH_METHODDEF    \
677     {"flush", (PyCFunction)_io_TextIOWrapper_flush, METH_NOARGS, _io_TextIOWrapper_flush__doc__},
678 
679 static PyObject *
680 _io_TextIOWrapper_flush_impl(textio *self);
681 
682 static PyObject *
_io_TextIOWrapper_flush(textio * self,PyObject * Py_UNUSED (ignored))683 _io_TextIOWrapper_flush(textio *self, PyObject *Py_UNUSED(ignored))
684 {
685     return _io_TextIOWrapper_flush_impl(self);
686 }
687 
688 PyDoc_STRVAR(_io_TextIOWrapper_close__doc__,
689 "close($self, /)\n"
690 "--\n"
691 "\n");
692 
693 #define _IO_TEXTIOWRAPPER_CLOSE_METHODDEF    \
694     {"close", (PyCFunction)_io_TextIOWrapper_close, METH_NOARGS, _io_TextIOWrapper_close__doc__},
695 
696 static PyObject *
697 _io_TextIOWrapper_close_impl(textio *self);
698 
699 static PyObject *
_io_TextIOWrapper_close(textio * self,PyObject * Py_UNUSED (ignored))700 _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
701 {
702     return _io_TextIOWrapper_close_impl(self);
703 }
704 /*[clinic end generated code: output=b1bae4f4cdf6019e input=a9049054013a1b77]*/
705