File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -160,14 +160,14 @@ batched_next(batchedobject *bo)
160
160
}
161
161
PyList_SET_ITEM (result , i , item );
162
162
}
163
- if (i < bo -> batch_size ) {
163
+ if (i > 0 && i < bo -> batch_size ) {
164
164
PyObject * short_list = PyList_GetSlice (result , 0 , i );
165
165
Py_SETREF (result , short_list );
166
166
if (result == NULL ) {
167
167
return NULL ;
168
168
}
169
169
}
170
- if (PyList_GET_SIZE ( result ) > 0 ) {
170
+ if (i > 0 ) {
171
171
return result ;
172
172
}
173
173
Py_CLEAR (bo -> it );
Original file line number Diff line number Diff line change 7
7
#include "pycore_object.h" // _PyObject_GC_TRACK()
8
8
#include "pycore_tuple.h" // _PyTuple_FromArray()
9
9
#include <stddef.h>
10
+ #include <stdio.h>
10
11
11
12
/*[clinic input]
12
13
class list "PyListObject *" "&PyList_Type"
You can’t perform that action at this time.
0 commit comments