| 86 | |
| 87 | |
| 88 | static int |
| 89 | fb_nextbuf(python_chunks_from_file *fb, char **start, char **end, int *kind) |
| 90 | { |
| 91 | Py_XDECREF(fb->chunk); |
| 92 | fb->chunk = NULL; |
| 93 | |
| 94 | PyObject *chunk = PyObject_CallFunctionObjArgs(fb->read, fb->chunksize, NULL); |
| 95 | if (chunk == NULL) { |
| 96 | return -1; |
| 97 | } |
| 98 | fb->chunk = process_stringlike(chunk, fb->encoding); |
| 99 | if (fb->chunk == NULL) { |
| 100 | return -1; |
| 101 | } |
| 102 | buffer_info_from_unicode(fb->chunk, start, end, kind); |
| 103 | if (*start == *end) { |
| 104 | return BUFFER_IS_FILEEND; |
| 105 | } |
| 106 | return BUFFER_MAY_CONTAIN_NEWLINE; |
| 107 | } |
| 108 | |
| 109 | |
| 110 | static int |
nothing calls this directly
no test coverage detected