Skip to content

Commit cc09774

Browse files
committed
Address review comments
1 parent 5725821 commit cc09774

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ PyAPI_FUNC(_PyStackRef) _PyFloat_FromDouble_ConsumeInputs(_PyStackRef left, _PyS
353353
extern int _PyRunRemoteDebugger(PyThreadState *tstate);
354354
#endif
355355

356-
_PyStackRef
356+
PyAPI_FUNC(_PyStackRef)
357357
_PyForIter_VirtualIteratorNext(PyThreadState* tstate, struct _PyInterpreterFrame* frame, _PyStackRef iter, _PyStackRef *index_ptr);
358358

359359
#ifdef __cplusplus

Python/bytecodes.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,6 +3130,7 @@ dummy_func(
31303130
if (PyStackRef_IsError(item)) {
31313131
ERROR_NO_POP();
31323132
}
3133+
// Jump forward by oparg and skip the following END_FOR
31333134
JUMPBY(oparg + 1);
31343135
DISPATCH();
31353136
}
@@ -3159,6 +3160,7 @@ dummy_func(
31593160
if (PyStackRef_IsError(item)) {
31603161
ERROR_NO_POP();
31613162
}
3163+
// Jump forward by oparg and skip the following END_FOR
31623164
JUMPBY(oparg + 1);
31633165
DISPATCH();
31643166
}

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3475,7 +3475,7 @@ _PyStackRef _PyForIter_VirtualIteratorNext(PyThreadState* tstate, _PyInterpreter
34753475
_PyErr_Clear(tstate);
34763476
}
34773477
else {
3478-
return PyStackRef_ERROR;
3478+
return PyStackRef_ERROR;
34793479
}
34803480
}
34813481
return PyStackRef_NULL;

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ dummy_func(void) {
843843
op(_GET_ITER, (iterable -- iter, index_or_null)) {
844844
if (sym_matches_type(iterable, &PyTuple_Type) || sym_matches_type(iterable, &PyList_Type)) {
845845
iter = iterable;
846-
index_or_null = sym_new_type(ctx, &PyLong_Type);
846+
index_or_null = sym_new_not_null(ctx);
847847
}
848848
else {
849849
iter = sym_new_not_null(ctx);

Python/optimizer_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)