Skip to content
Snippets Groups Projects
Commit 828ce16d authored by Damien George's avatar Damien George
Browse files

py/compile: Change comment about ITER_BUF_NSLOTS to a static assertion.

parent 43d08d6d
Branches
No related tags found
No related merge requests found
...@@ -3052,7 +3052,7 @@ STATIC void compile_scope(compiler_t *comp, scope_t *scope, pass_kind_t pass) { ...@@ -3052,7 +3052,7 @@ STATIC void compile_scope(compiler_t *comp, scope_t *scope, pass_kind_t pass) {
// There are 4 slots on the stack for the iterator, and the first one is // There are 4 slots on the stack for the iterator, and the first one is
// NULL to indicate that the second one points to the iterator object. // NULL to indicate that the second one points to the iterator object.
if (scope->kind == SCOPE_GEN_EXPR) { if (scope->kind == SCOPE_GEN_EXPR) {
// TODO static assert that MP_OBJ_ITER_BUF_NSLOTS == 4 MP_STATIC_ASSERT(MP_OBJ_ITER_BUF_NSLOTS == 4);
EMIT(load_null); EMIT(load_null);
compile_load_id(comp, qstr_arg); compile_load_id(comp, qstr_arg);
EMIT(load_null); EMIT(load_null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment