1/*[clinic input]
2preserve
3[clinic start generated code]*/
4
5PyDoc_STRVAR(_io__IOBase_tell__doc__,
6"tell($self, /)\n"
7"--\n"
8"\n"
9"Return current stream position.");
10
11#define _IO__IOBASE_TELL_METHODDEF    \
12    {"tell", (PyCFunction)_io__IOBase_tell, METH_NOARGS, _io__IOBase_tell__doc__},
13
14static PyObject *
15_io__IOBase_tell_impl(PyObject *self);
16
17static PyObject *
18_io__IOBase_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
19{
20    return _io__IOBase_tell_impl(self);
21}
22
23PyDoc_STRVAR(_io__IOBase_flush__doc__,
24"flush($self, /)\n"
25"--\n"
26"\n"
27"Flush write buffers, if applicable.\n"
28"\n"
29"This is not implemented for read-only and non-blocking streams.");
30
31#define _IO__IOBASE_FLUSH_METHODDEF    \
32    {"flush", (PyCFunction)_io__IOBase_flush, METH_NOARGS, _io__IOBase_flush__doc__},
33
34static PyObject *
35_io__IOBase_flush_impl(PyObject *self);
36
37static PyObject *
38_io__IOBase_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
39{
40    return _io__IOBase_flush_impl(self);
41}
42
43PyDoc_STRVAR(_io__IOBase_close__doc__,
44"close($self, /)\n"
45"--\n"
46"\n"
47"Flush and close the IO object.\n"
48"\n"
49"This method has no effect if the file is already closed.");
50
51#define _IO__IOBASE_CLOSE_METHODDEF    \
52    {"close", (PyCFunction)_io__IOBase_close, METH_NOARGS, _io__IOBase_close__doc__},
53
54static PyObject *
55_io__IOBase_close_impl(PyObject *self);
56
57static PyObject *
58_io__IOBase_close(PyObject *self, PyObject *Py_UNUSED(ignored))
59{
60    return _io__IOBase_close_impl(self);
61}
62
63PyDoc_STRVAR(_io__IOBase_seekable__doc__,
64"seekable($self, /)\n"
65"--\n"
66"\n"
67"Return whether object supports random access.\n"
68"\n"
69"If False, seek(), tell() and truncate() will raise OSError.\n"
70"This method may need to do a test seek().");
71
72#define _IO__IOBASE_SEEKABLE_METHODDEF    \
73    {"seekable", (PyCFunction)_io__IOBase_seekable, METH_NOARGS, _io__IOBase_seekable__doc__},
74
75static PyObject *
76_io__IOBase_seekable_impl(PyObject *self);
77
78static PyObject *
79_io__IOBase_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
80{
81    return _io__IOBase_seekable_impl(self);
82}
83
84PyDoc_STRVAR(_io__IOBase_readable__doc__,
85"readable($self, /)\n"
86"--\n"
87"\n"
88"Return whether object was opened for reading.\n"
89"\n"
90"If False, read() will raise OSError.");
91
92#define _IO__IOBASE_READABLE_METHODDEF    \
93    {"readable", (PyCFunction)_io__IOBase_readable, METH_NOARGS, _io__IOBase_readable__doc__},
94
95static PyObject *
96_io__IOBase_readable_impl(PyObject *self);
97
98static PyObject *
99_io__IOBase_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
100{
101    return _io__IOBase_readable_impl(self);
102}
103
104PyDoc_STRVAR(_io__IOBase_writable__doc__,
105"writable($self, /)\n"
106"--\n"
107"\n"
108"Return whether object was opened for writing.\n"
109"\n"
110"If False, write() will raise OSError.");
111
112#define _IO__IOBASE_WRITABLE_METHODDEF    \
113    {"writable", (PyCFunction)_io__IOBase_writable, METH_NOARGS, _io__IOBase_writable__doc__},
114
115static PyObject *
116_io__IOBase_writable_impl(PyObject *self);
117
118static PyObject *
119_io__IOBase_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
120{
121    return _io__IOBase_writable_impl(self);
122}
123
124PyDoc_STRVAR(_io__IOBase_fileno__doc__,
125"fileno($self, /)\n"
126"--\n"
127"\n"
128"Returns underlying file descriptor if one exists.\n"
129"\n"
130"OSError is raised if the IO object does not use a file descriptor.");
131
132#define _IO__IOBASE_FILENO_METHODDEF    \
133    {"fileno", (PyCFunction)_io__IOBase_fileno, METH_NOARGS, _io__IOBase_fileno__doc__},
134
135static PyObject *
136_io__IOBase_fileno_impl(PyObject *self);
137
138static PyObject *
139_io__IOBase_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
140{
141    return _io__IOBase_fileno_impl(self);
142}
143
144PyDoc_STRVAR(_io__IOBase_isatty__doc__,
145"isatty($self, /)\n"
146"--\n"
147"\n"
148"Return whether this is an \'interactive\' stream.\n"
149"\n"
150"Return False if it can\'t be determined.");
151
152#define _IO__IOBASE_ISATTY_METHODDEF    \
153    {"isatty", (PyCFunction)_io__IOBase_isatty, METH_NOARGS, _io__IOBase_isatty__doc__},
154
155static PyObject *
156_io__IOBase_isatty_impl(PyObject *self);
157
158static PyObject *
159_io__IOBase_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
160{
161    return _io__IOBase_isatty_impl(self);
162}
163
164PyDoc_STRVAR(_io__IOBase_readline__doc__,
165"readline($self, size=-1, /)\n"
166"--\n"
167"\n"
168"Read and return a line from the stream.\n"
169"\n"
170"If size is specified, at most size bytes will be read.\n"
171"\n"
172"The line terminator is always b\'\\n\' for binary files; for text\n"
173"files, the newlines argument to open can be used to select the line\n"
174"terminator(s) recognized.");
175
176#define _IO__IOBASE_READLINE_METHODDEF    \
177    {"readline", (PyCFunction)_io__IOBase_readline, METH_VARARGS, _io__IOBase_readline__doc__},
178
179static PyObject *
180_io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit);
181
182static PyObject *
183_io__IOBase_readline(PyObject *self, PyObject *args)
184{
185    PyObject *return_value = NULL;
186    Py_ssize_t limit = -1;
187
188    if (!PyArg_ParseTuple(args, "|O&:readline",
189        _PyIO_ConvertSsize_t, &limit)) {
190        goto exit;
191    }
192    return_value = _io__IOBase_readline_impl(self, limit);
193
194exit:
195    return return_value;
196}
197
198PyDoc_STRVAR(_io__IOBase_readlines__doc__,
199"readlines($self, hint=-1, /)\n"
200"--\n"
201"\n"
202"Return a list of lines from the stream.\n"
203"\n"
204"hint can be specified to control the number of lines read: no more\n"
205"lines will be read if the total size (in bytes/characters) of all\n"
206"lines so far exceeds hint.");
207
208#define _IO__IOBASE_READLINES_METHODDEF    \
209    {"readlines", (PyCFunction)_io__IOBase_readlines, METH_VARARGS, _io__IOBase_readlines__doc__},
210
211static PyObject *
212_io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint);
213
214static PyObject *
215_io__IOBase_readlines(PyObject *self, PyObject *args)
216{
217    PyObject *return_value = NULL;
218    Py_ssize_t hint = -1;
219
220    if (!PyArg_ParseTuple(args, "|O&:readlines",
221        _PyIO_ConvertSsize_t, &hint)) {
222        goto exit;
223    }
224    return_value = _io__IOBase_readlines_impl(self, hint);
225
226exit:
227    return return_value;
228}
229
230PyDoc_STRVAR(_io__IOBase_writelines__doc__,
231"writelines($self, lines, /)\n"
232"--\n"
233"\n");
234
235#define _IO__IOBASE_WRITELINES_METHODDEF    \
236    {"writelines", (PyCFunction)_io__IOBase_writelines, METH_O, _io__IOBase_writelines__doc__},
237
238PyDoc_STRVAR(_io__RawIOBase_read__doc__,
239"read($self, size=-1, /)\n"
240"--\n"
241"\n");
242
243#define _IO__RAWIOBASE_READ_METHODDEF    \
244    {"read", (PyCFunction)_io__RawIOBase_read, METH_VARARGS, _io__RawIOBase_read__doc__},
245
246static PyObject *
247_io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n);
248
249static PyObject *
250_io__RawIOBase_read(PyObject *self, PyObject *args)
251{
252    PyObject *return_value = NULL;
253    Py_ssize_t n = -1;
254
255    if (!PyArg_ParseTuple(args, "|n:read",
256        &n)) {
257        goto exit;
258    }
259    return_value = _io__RawIOBase_read_impl(self, n);
260
261exit:
262    return return_value;
263}
264
265PyDoc_STRVAR(_io__RawIOBase_readall__doc__,
266"readall($self, /)\n"
267"--\n"
268"\n"
269"Read until EOF, using multiple read() call.");
270
271#define _IO__RAWIOBASE_READALL_METHODDEF    \
272    {"readall", (PyCFunction)_io__RawIOBase_readall, METH_NOARGS, _io__RawIOBase_readall__doc__},
273
274static PyObject *
275_io__RawIOBase_readall_impl(PyObject *self);
276
277static PyObject *
278_io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
279{
280    return _io__RawIOBase_readall_impl(self);
281}
282/*[clinic end generated code: output=0f53fed928d8e02f input=a9049054013a1b77]*/
283