MCPcopy Create free account
hub / github.com/numpy/numpy / it_nextbuf

Function it_nextbuf

numpy/core/src/multiarray/textreading/stream_pyobject.c:190–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190static int
191it_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
215NPY_NO_EXPORT stream *

Callers

nothing calls this directly

Calls 2

process_stringlikeFunction · 0.85
buffer_info_from_unicodeFunction · 0.85

Tested by

no test coverage detected