Lines Matching refs:line
31 "This class provides a character and line based interface to stream\n"
110 "Only line endings translated during reading are considered.\n"
1033 Character and line based layer over a BufferedIOBase object, buffer.
1042 newline controls how line endings are handled. It can be None, '',
1048 caller. If it is '', universal newline mode is enabled, but line
1051 string, and the line ending is returned to the caller untranslated.
1054 translated to the system default line separator, os.linesep. If
2110 PyObject *line = NULL, *chunks = NULL, *remaining = NULL;
2152 line = self->decoded_chars;
2155 Py_INCREF(line);
2159 line = PyUnicode_Concat(remaining, self->decoded_chars);
2163 if (line == NULL)
2165 if (PyUnicode_READY(line) == -1)
2169 ptr = PyUnicode_DATA(line);
2170 line_len = PyUnicode_GET_LENGTH(line);
2171 kind = PyUnicode_KIND(line);
2189 /* Didn't find line ending, but reached length limit */
2195 /* No line ending seen yet - put aside current data */
2202 s = PyUnicode_Substring(line, start, endpos);
2215 remaining = PyUnicode_Substring(line, endpos, line_len);
2219 Py_CLEAR(line);
2224 if (line != NULL) {
2225 /* Our line ends in the current buffer */
2227 if (start > 0 || endpos < PyUnicode_GET_LENGTH(line)) {
2228 PyObject *s = PyUnicode_Substring(line, start, endpos);
2229 Py_CLEAR(line);
2232 line = s;
2246 if (line != NULL) {
2247 if (PyList_Append(chunks, line) < 0)
2249 Py_DECREF(line);
2251 line = PyUnicode_Join(&_Py_STR(empty), chunks);
2252 if (line == NULL)
2256 if (line == NULL) {
2257 line = Py_NewRef(&_Py_STR(empty));
2260 return line;
2265 Py_XDECREF(line);
3062 PyObject *line;
3069 line = _textiowrapper_readline(self, -1);
3072 line = PyObject_CallMethodNoArgs((PyObject *)self,
3074 if (line && !PyUnicode_Check(line)) {
3077 "not '%.200s'", Py_TYPE(line)->tp_name);
3078 Py_DECREF(line);
3083 if (line == NULL || PyUnicode_READY(line) == -1)
3086 if (PyUnicode_GET_LENGTH(line) == 0) {
3088 Py_DECREF(line);
3094 return line;