Commit 734cedfe authored by Benjamin Peterson's avatar Benjamin Peterson

strengthen condition and add assertion

parent ab41ae03
...@@ -670,7 +670,8 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name) ...@@ -670,7 +670,8 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name)
return NULL; return NULL;
stack_size = PyList_GET_SIZE(c->c_stack); 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) { if (scope_name != NULL && !global_scope) {
int scope; int scope;
PyObject *mangled; PyObject *mangled;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment