| 188 | |
| 189 | |
| 190 | static int |
| 191 | it_nextbuf(python_lines_from_iterator *it, char **start, char **end, int *kind) |
| 192 | { |
| 193 | Py_XDECREF(it->line); |
| 194 | it->line = NULL; |
| 195 | |
| 196 | PyObject *line = PyIter_Next(it->iterator); |
| 197 | if (line == NULL) { |
| 198 | if (PyErr_Occurred()) { |
| 199 | return -1; |
| 200 | } |
| 201 | *start = NULL; |
| 202 | *end = NULL; |
| 203 | return BUFFER_IS_FILEEND; |
| 204 | } |
| 205 | it->line = process_stringlike(line, it->encoding); |
| 206 | if (it->line == NULL) { |
| 207 | return -1; |
| 208 | } |
| 209 | |
| 210 | buffer_info_from_unicode(it->line, start, end, kind); |
| 211 | return BUFFER_IS_LINEND; |
| 212 | } |
| 213 | |
| 214 | |
| 215 | NPY_NO_EXPORT stream * |
nothing calls this directly
no test coverage detected