[Python-checkins] cpython: strengthen condition and add assertion
benjamin.peterson
python-checkins at python.org
Sat Oct 19 22:38:31 CEST 2013
http://hg.python.org/cpython/rev/50bb4300bf2b
changeset: 86495:50bb4300bf2b
user: Benjamin Peterson <benjamin at python.org>
date: Sat Oct 19 16:14:39 2013 -0400
summary:
strengthen condition and add assertion
files:
Python/compile.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Python/compile.c b/Python/compile.c
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -670,7 +670,8 @@
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;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list