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