diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-10-19 16:14:39 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-10-19 16:14:39 -0400 |
commit | 3ab3848f8e40baaa5563d0cbc8b7d63f62075792 (patch) | |
tree | d0729f561e356e556cb40cb9ba915b7839d4b565 /Python/compile.c | |
parent | 4338381d4571a885c9caf252f4d3eb3649377058 (diff) | |
download | cpython-3ab3848f8e40baaa5563d0cbc8b7d63f62075792.tar.gz |
strengthen condition and add assertion
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 85ea1d098d..9176e3131d 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -670,7 +670,8 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name) return NULL; stack_size = PyList_GET_SIZE(c->c_stack); - global_scope = stack_size <= 1; + assert(stack_size >= 1); + global_scope = stack_size == 1; if (scope_name != NULL && !global_scope) { int scope; PyObject *mangled; |