Lines Matching defs:raw

27     "BlockingIOError if the underlying raw stream is in non-blocking\n"

28 "mode and not ready; unlike their raw counterparts, they will never\n"
77 "Disconnect this buffer from its underlying raw stream and return it.\n"
79 "After the raw stream has been detached, the buffer is in an unusable\n"
94 "If the argument is positive, and the underlying raw stream is\n"
95 "not 'interactive', multiple raw reads may be issued to satisfy\n"
97 "interactive raw streams (as well as sockets and pipes), at most\n"
98 "one raw read will be issued, and a short result does not imply\n"
103 "Returns None if the underlying raw stream was open in non-blocking\n"
114 "to the underlying raw stream. A short result does not imply\n"
132 "underlying raw stream cannot accept more data at the moment.\n");
195 PyObject *raw;
202 class) *and* the raw stream is a vanilla FileIO object. */
205 /* Absolute position inside the raw stream (-1 if unknown). */
212 /* Position of the raw stream in the buffer. */
246 * The absolute position of the raw stream is cached, if possible, in the
248 on the raw stream. If not sure, it can be reinitialized by calling
249 _buffered_raw_tell(), which queries the raw stream (_buffered_raw_seek()
255 raw stream (according to the buffer size), but for now it is only done
303 "raw stream has been detached"); \
315 "raw stream has been detached"); \
325 ? _PyFileIO_closed(self->raw) \
374 Py_CLEAR(self->raw);
392 Py_VISIT(self->raw);
403 Py_CLEAR(self->raw);
420 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_flush, NULL);
429 res = PyObject_GetAttr(self->raw, _PyIO_str_closed);
441 return PyObject_GetAttr(self->raw, _PyIO_str_closed);
472 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_close, NULL);
484 PyObject *raw, *res;
490 raw = self->raw;
491 self->raw = NULL;
494 return raw;
503 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_seekable, NULL);
510 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_readable, NULL);
517 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_writable, NULL);
524 return PyObject_GetAttrString(self->raw, "name");
531 return PyObject_GetAttrString(self->raw, "mode");
540 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_fileno, NULL);
547 return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_isatty, NULL);
598 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_tell, NULL);
628 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_seek,
735 /* Rewind the raw stream so that its position corresponds to
844 only return buffered bytes. Otherwise, we do one raw read. */
847 If we need to read from the raw stream, then we could actually read
862 /* Fill the buffer from the raw stream, and copy it to the result. */
888 /* TODO: use raw.readinto() instead! */
938 /* Now we try to get some more from the raw stream */
1089 /* Fallback: invoke raw seek() method and clear buffer */
1136 /* Rewind the raw stream so that its position corresponds to
1143 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_truncate, pos, NULL);
1224 "Create a new buffered reader using the given readable raw IO object.");
1234 char *kwlist[] = {"raw", "buffer_size", NULL};
1236 PyObject *raw;
1242 &raw, &buffer_size)) {
1246 if (_PyIOBase_check_readable(raw, Py_True) == NULL)
1249 Py_CLEAR(self->raw);
1250 Py_INCREF(raw);
1251 self->raw = raw;
1261 Py_TYPE(raw) == &PyFileIO_Type);
1285 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_readinto, memobj, NULL);
1299 "raw readinto() returned invalid length %zd "
1366 data = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_read, NULL);
1523 /* Fill the buffer from the raw stream, and copy it to the result. */
1556 {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
1628 "The constructor creates a BufferedWriter for the given writeable raw\n"
1644 char *kwlist[] = {"raw", "buffer_size", "max_buffer_size", NULL};
1647 PyObject *raw;
1653 &raw, &buffer_size, &max_buffer_size)) {
1660 if (_PyIOBase_check_writable(raw, Py_True) == NULL)
1663 Py_CLEAR(self->raw);
1664 Py_INCREF(raw);
1665 self->raw = raw;
1676 Py_TYPE(raw) == &PyFileIO_Type);
1700 res = PyObject_CallMethodObjArgs(self->raw, _PyIO_str_write, memobj, NULL);
1709 "raw write() returned invalid length %zd "
1718 /* `restore_pos` is 1 if we need to restore the raw stream position at
1860 /* Adjust the raw stream position if it is away from the logical stream
1863 the raw stream by itself).
1947 {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
2264 "raw, given in the first argument. If the buffer_size is omitted it\n"
2271 char *kwlist[] = {"raw", "buffer_size", "max_buffer_size", NULL};
2274 PyObject *raw;
2280 &raw, &buffer_size, &max_buffer_size)) {
2287 if (_PyIOBase_check_seekable(raw, Py_True) == NULL)
2289 if (_PyIOBase_check_readable(raw, Py_True) == NULL)
2291 if (_PyIOBase_check_writable(raw, Py_True) == NULL)
2294 Py_CLEAR(self->raw);
2295 Py_INCREF(raw);
2296 self->raw = raw;
2308 Py_TYPE(raw) == &PyFileIO_Type);
2339 {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},