| 1264 | } |
| 1265 | |
| 1266 | static PyObject * |
| 1267 | npyiter_iternext(NewNpyArrayIterObject *self, PyObject *NPY_UNUSED(args)) |
| 1268 | { |
| 1269 | if (self->iter != NULL && self->iternext != NULL && |
| 1270 | !self->finished && self->iternext(self->iter)) { |
| 1271 | /* If there is nesting, the nested iterators should be reset */ |
| 1272 | if (npyiter_resetbasepointers(self) != NPY_SUCCEED) { |
| 1273 | return NULL; |
| 1274 | } |
| 1275 | |
| 1276 | Py_RETURN_TRUE; |
| 1277 | } |
| 1278 | else { |
| 1279 | if (PyErr_Occurred()) { |
| 1280 | /* casting error, buffer cleanup will occur at reset or dealloc */ |
| 1281 | return NULL; |
| 1282 | } |
| 1283 | self->finished = 1; |
| 1284 | Py_RETURN_FALSE; |
| 1285 | } |
| 1286 | } |
| 1287 | |
| 1288 | static PyObject * |
| 1289 | npyiter_remove_axis(NewNpyArrayIterObject *self, PyObject *args) |
nothing calls this directly
no test coverage detected